diff options
| author | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-11-20 05:45:44 +0000 |
|---|---|---|
| committer | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2004-11-20 05:45:44 +0000 |
| commit | 623440ac9ed3a5600a081990f6d479d7042b7c09 (patch) | |
| tree | 9b9ab222bdac61873e2616bdeff9260ceb2438f7 /src/botserv.c | |
| parent | a4c34ef876480a6a50079575cedca6899e5c2840 (diff) | |
BUILD : 1.7.6 (452) BUGS : N/A NOTES : 1. Fixed some config options could overflow strtol(), 2. Fixed CTCP Ping replies when UsePrivmsg is enabled
git-svn-id: svn://svn.anope.org/anope/trunk@452 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@306 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/botserv.c')
| -rw-r--r-- | src/botserv.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/botserv.c b/src/botserv.c index e0cd346ba..25986b566 100644 --- a/src/botserv.c +++ b/src/botserv.c @@ -147,9 +147,10 @@ void botserv(User * u, char *buf) if (!cmd) { return; } else if (stricmp(cmd, "\1PING") == 0) { - if (!(s = strtok(NULL, ""))) - s = "\1"; - notice(s_BotServ, u->nick, "\1PING %s", s); + if (!(s = strtok(NULL, ""))) { + s = ""; + } + anope_cmd_ctcp(s_BotServ, u->nick, "PING %s", s); } else if (skeleton) { notice_lang(s_BotServ, u, SERVICE_OFFLINE, s_BotServ); } else { @@ -171,9 +172,10 @@ void botmsgs(User * u, BotInfo * bi, char *buf) return; if (!stricmp(cmd, "\1PING")) { - if (!(s = strtok(NULL, ""))) - s = "\1"; - notice(bi->nick, u->nick, "\1PING %s", s); + if (!(s = strtok(NULL, ""))) { + s = ""; + } + anope_cmd_ctcp(bi->nick, u->nick, "PING %s", s); } } @@ -197,8 +199,9 @@ void botchanmsgs(User * u, ChannelInfo * ci, char *buf) } /* Answer to ping if needed, without breaking the buffer. */ - if (!strnicmp(buf, "\1PING", 5)) - notice(ci->bi->nick, u->nick, buf); + if (!strnicmp(buf, "\1PING", 5)) { + anope_cmd_ctcp(ci->bi->nick, u->nick, "PING %s", buf); + } /* If it's a /me, cut the CTCP part at the beginning (not * at the end, because one character just doesn't matter, @@ -2484,6 +2487,9 @@ char *normalizeBuffer(char *buf) for (i = 0; i < len; i++) { switch (buf[i]) { + /* ctrl char */ + case 1: + break; /* Bold ctrl char */ case 2: break; |
