diff options
| author | phil-lavin <phil-lavin@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-12 18:13:34 +0000 |
|---|---|---|
| committer | phil-lavin <phil-lavin@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-12 18:13:34 +0000 |
| commit | d049bf0d8f0f0e219a22e3dd1d2ad72fd85f1a08 (patch) | |
| tree | 77bff603160d74237fb662c7e2023993cd887e0e /src/core | |
| parent | a53cbd82cc2499c4d0f7e84ec50e6b07a7cca2c7 (diff) | |
Added a tonne of alog()s to log all stateful commands
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2952 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/bs_assign.c | 2 | ||||
| -rw-r--r-- | src/core/bs_badwords.c | 12 | ||||
| -rw-r--r-- | src/core/bs_kick.c | 88 | ||||
| -rw-r--r-- | src/core/bs_set.c | 28 | ||||
| -rw-r--r-- | src/core/bs_unassign.c | 2 | ||||
| -rw-r--r-- | src/core/cs_akick.c | 15 | ||||
| -rw-r--r-- | src/core/cs_clear.c | 19 | ||||
| -rw-r--r-- | src/core/cs_getkey.c | 2 | ||||
| -rw-r--r-- | src/core/cs_set.c | 64 | ||||
| -rw-r--r-- | src/core/hs_group.c | 2 | ||||
| -rw-r--r-- | src/core/ms_sendall.c | 2 | ||||
| -rw-r--r-- | src/core/ms_set.c | 42 | ||||
| -rw-r--r-- | src/core/ns_access.c | 5 | ||||
| -rw-r--r-- | src/core/ns_ghost.c | 5 | ||||
| -rw-r--r-- | src/core/ns_recover.c | 5 | ||||
| -rw-r--r-- | src/core/ns_saset.c | 58 | ||||
| -rw-r--r-- | src/core/ns_set.c | 54 |
17 files changed, 371 insertions, 34 deletions
diff --git a/src/core/bs_assign.c b/src/core/bs_assign.c index 05b247802..3d94c89f1 100644 --- a/src/core/bs_assign.c +++ b/src/core/bs_assign.c @@ -95,6 +95,8 @@ int do_assign(User * u) if (ci->c && ci->c->usercount >= BSMinUsers) { bot_join(ci); } + alog("%s: %s!%s@%s assigned bot %s to %s", s_BotServ, u->nick, u->username, + u->host, bi->nick, ci->name); notice_lang(s_BotServ, u, BOT_ASSIGN_ASSIGNED, bi->nick, ci->name); send_event(EVENT_BOT_ASSIGN, 2, ci->name, bi->nick); } diff --git a/src/core/bs_badwords.c b/src/core/bs_badwords.c index 3a0d8963f..5f9eb29a7 100644 --- a/src/core/bs_badwords.c +++ b/src/core/bs_badwords.c @@ -143,7 +143,9 @@ int do_badwords(User * u) bw->in_use = 1; bw->word = sstrdup(word); bw->type = type; - + + alog("%s: %s!%s@%s added badword \"%s\" to %s", + s_BotServ, u->nick, u->username, u->host, bw->word, ci->name); notice_lang(s_BotServ, u, BOT_BADWORDS_ADDED, bw->word, ci->name); } else if (stricmp(cmd, "DEL") == 0) { @@ -169,9 +171,13 @@ int do_badwords(User * u) ci->name); } } else if (deleted == 1) { + alog("%s: %s!%s@%s deleted 1 badword from %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_BADWORDS_DELETED_ONE, ci->name); } else { + alog("%s: %s!%s@%s deleted %d badwords from %s", + s_BotServ, u->nick, u->username, u->host, deleted, ci->name); notice_lang(s_BotServ, u, BOT_BADWORDS_DELETED_SEVERAL, deleted, ci->name); } @@ -187,6 +193,8 @@ int do_badwords(User * u) return MOD_CONT; } bw = &ci->badwords[i]; + alog("%s: %s!%s@%s deleted badword \"%s\" from %s", + s_BotServ, u->nick, u->username, u->host, bw->word, ci->name); notice_lang(s_BotServ, u, BOT_BADWORDS_DELETED, bw->word, ci->name); if (bw->word) @@ -266,6 +274,8 @@ int do_badwords(User * u) ci->badwords = NULL; ci->bwcount = 0; + alog("%s: %s!%s@%s cleared badwords on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_BADWORDS_CLEAR); } else { diff --git a/src/core/bs_kick.c b/src/core/bs_kick.c index b45f86941..9d7d2c21e 100644 --- a/src/core/bs_kick.c +++ b/src/core/bs_kick.c @@ -136,13 +136,20 @@ int do_kickcmd(User * u) ci->ttb[TTB_BADWORDS] = 0; } ci->botflags |= BS_KICK_BADWORDS; - if (ci->ttb[TTB_BADWORDS]) + if (ci->ttb[TTB_BADWORDS]) { + alog("%s: %s!%s@%s enabled kicking for badwords on %s with time to ban of %d", + s_BotServ, u->nick, u->username, u->host, ci->name, ci->ttb[TTB_BADWORDS]); notice_lang(s_BotServ, u, BOT_KICK_BADWORDS_ON_BAN, ci->ttb[TTB_BADWORDS]); - else + } else { + alog("%s: %s!%s@%s enabled kicking for badwords on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_BADWORDS_ON); + } } else { ci->botflags &= ~BS_KICK_BADWORDS; + alog("%s: %s!%s@%s disabled kicking for badwords on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_BADWORDS_OFF); } } else if (!stricmp(option, "BOLDS")) { @@ -162,13 +169,20 @@ int do_kickcmd(User * u) } else ci->ttb[TTB_BOLDS] = 0; ci->botflags |= BS_KICK_BOLDS; - if (ci->ttb[TTB_BOLDS]) + if (ci->ttb[TTB_BOLDS]) { + alog("%s: %s!%s@%s enabled kicking for bolds on %s with time to ban of %d", + s_BotServ, u->nick, u->username, u->host, ci->name, ci->ttb[TTB_BOLDS]); notice_lang(s_BotServ, u, BOT_KICK_BOLDS_ON_BAN, ci->ttb[TTB_BOLDS]); - else + } else { + alog("%s: %s!%s@%s enabled kicking for bolds on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_BOLDS_ON); + } } else { ci->botflags &= ~BS_KICK_BOLDS; + alog("%s: %s!%s@%s disabled kicking for bolds on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_BOLDS_OFF); } } else if (!stricmp(option, "CAPS")) { @@ -206,14 +220,21 @@ int do_kickcmd(User * u) ci->capspercent = 25; ci->botflags |= BS_KICK_CAPS; - if (ci->ttb[TTB_CAPS]) + if (ci->ttb[TTB_CAPS]) { + alog("%s: %s!%s@%s enabled kicking for caps on %s with time to ban of %d", + s_BotServ, u->nick, u->username, u->host, ci->name, ci->ttb[TTB_CAPS]); notice_lang(s_BotServ, u, BOT_KICK_CAPS_ON_BAN, ci->capsmin, ci->capspercent, ci->ttb[TTB_CAPS]); - else + } else { + alog("%s: %s!%s@%s enabled kicking for caps on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_CAPS_ON, ci->capsmin, ci->capspercent); + } } else { + alog("%s: %s!%s@%s disabled kicking for caps on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); ci->botflags &= ~BS_KICK_CAPS; notice_lang(s_BotServ, u, BOT_KICK_CAPS_OFF); } @@ -234,12 +255,19 @@ int do_kickcmd(User * u) } else ci->ttb[TTB_COLORS] = 0; ci->botflags |= BS_KICK_COLORS; - if (ci->ttb[TTB_COLORS]) + if (ci->ttb[TTB_COLORS]) { + alog("%s: %s!%s@%s enabled kicking for colors on %s with time to ban of %d", + s_BotServ, u->nick, u->username, u->host, ci->name, ci->ttb[TTB_COLORS]); notice_lang(s_BotServ, u, BOT_KICK_COLORS_ON_BAN, ci->ttb[TTB_COLORS]); - else + } else { + alog("%s: %s!%s@%s enabled kicking for colors on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_COLORS_ON); + } } else { + alog("%s: %s!%s@%s disabled kicking for colors on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); ci->botflags &= ~BS_KICK_COLORS; notice_lang(s_BotServ, u, BOT_KICK_COLORS_OFF); } @@ -278,15 +306,22 @@ int do_kickcmd(User * u) ci->floodsecs = 10; ci->botflags |= BS_KICK_FLOOD; - if (ci->ttb[TTB_FLOOD]) + if (ci->ttb[TTB_FLOOD]) { + alog("%s: %s!%s@%s enabled kicking for flood on %s with time to ban of %d", + s_BotServ, u->nick, u->username, u->host, ci->name, ci->ttb[TTB_FLOOD]); notice_lang(s_BotServ, u, BOT_KICK_FLOOD_ON_BAN, ci->floodlines, ci->floodsecs, ci->ttb[TTB_FLOOD]); - else + } else { + alog("%s: %s!%s@%s enabled kicking for flood on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_FLOOD_ON, ci->floodlines, ci->floodsecs); + } } else { ci->botflags &= ~BS_KICK_FLOOD; + alog("%s: %s!%s@%s disabled kicking for flood on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_FLOOD_OFF); } } else if (!stricmp(option, "REPEAT")) { @@ -316,14 +351,21 @@ int do_kickcmd(User * u) ci->repeattimes = 3; ci->botflags |= BS_KICK_REPEAT; - if (ci->ttb[TTB_REPEAT]) + if (ci->ttb[TTB_REPEAT]) { + alog("%s: %s!%s@%s enabled kicking for repeating on %s with time to ban of %d", + s_BotServ, u->nick, u->username, u->host, ci->name, ci->ttb[TTB_REPEAT]); notice_lang(s_BotServ, u, BOT_KICK_REPEAT_ON_BAN, ci->repeattimes, ci->ttb[TTB_REPEAT]); - else + } else { + alog("%s: %s!%s@%s enabled kicking for repeating on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_REPEAT_ON, ci->repeattimes); + } } else { ci->botflags &= ~BS_KICK_REPEAT; + alog("%s: %s!%s@%s disabled kicking for repeating on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_REPEAT_OFF); } } else if (!stricmp(option, "REVERSES")) { @@ -344,13 +386,20 @@ int do_kickcmd(User * u) } else ci->ttb[TTB_REVERSES] = 0; ci->botflags |= BS_KICK_REVERSES; - if (ci->ttb[TTB_REVERSES]) + if (ci->ttb[TTB_REVERSES]) { + alog("%s: %s!%s@%s enabled kicking for reversess on %s with time to ban of %d", + s_BotServ, u->nick, u->username, u->host, ci->name, ci->ttb[TTB_REVERSES]); notice_lang(s_BotServ, u, BOT_KICK_REVERSES_ON_BAN, ci->ttb[TTB_REVERSES]); - else + } else { + alog("%s: %s!%s@%s enabled kicking for reverses on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_REVERSES_ON); + } } else { ci->botflags &= ~BS_KICK_REVERSES; + alog("%s: %s!%s@%s disabled kicking for reverses on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_REVERSES_OFF); } } else if (!stricmp(option, "UNDERLINES")) { @@ -371,13 +420,20 @@ int do_kickcmd(User * u) } else ci->ttb[TTB_UNDERLINES] = 0; ci->botflags |= BS_KICK_UNDERLINES; - if (ci->ttb[TTB_UNDERLINES]) + if (ci->ttb[TTB_UNDERLINES]) { + alog("%s: %s!%s@%s enabled kicking for underlines on %s with time to ban of %d", + s_BotServ, u->nick, u->username, u->host, ci->name, ci->ttb[TTB_UNDERLINES]); notice_lang(s_BotServ, u, BOT_KICK_UNDERLINES_ON_BAN, ci->ttb[TTB_UNDERLINES]); - else + } else { + alog("%s: %s!%s@%s enabled kicking for underlines on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_UNDERLINES_ON); + } } else { ci->botflags &= ~BS_KICK_UNDERLINES; + alog("%s: %s!%s@%s disabled kicking for underlines on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_KICK_UNDERLINES_OFF); } } else diff --git a/src/core/bs_set.c b/src/core/bs_set.c index b71765184..169f5b424 100644 --- a/src/core/bs_set.c +++ b/src/core/bs_set.c @@ -109,9 +109,13 @@ int do_set(User * u) if ((bi = findbot(chan))) { if (!stricmp(value, "ON")) { bi->flags |= BI_PRIVATE; + alog("%s: %s!%s@%s set PRIVATE on bot %s", + s_BotServ, u->nick, u->username, u->host, bi->nick); notice_lang(s_BotServ, u, BOT_SET_PRIVATE_ON, bi->nick); } else if (!stricmp(value, "OFF")) { bi->flags &= ~BI_PRIVATE; + alog("%s: %s!%s@%s unset PRIVATE on bot %s", + s_BotServ, u->nick, u->username, u->host, bi->nick); notice_lang(s_BotServ, u, BOT_SET_PRIVATE_OFF, bi->nick); } else { syntax_error(s_BotServ, u, "SET PRIVATE", @@ -131,10 +135,14 @@ int do_set(User * u) if (!stricmp(option, "DONTKICKOPS")) { if (!stricmp(value, "ON")) { ci->botflags |= BS_DONTKICKOPS; + alog("%s: %s!%s@%s set DONTKICKOPS on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_DONTKICKOPS_ON, ci->name); } else if (!stricmp(value, "OFF")) { ci->botflags &= ~BS_DONTKICKOPS; + alog("%s: %s!%s@%s unset DONTKICKOPS on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_DONTKICKOPS_OFF, ci->name); } else { @@ -144,10 +152,14 @@ int do_set(User * u) } else if (!stricmp(option, "DONTKICKVOICES")) { if (!stricmp(value, "ON")) { ci->botflags |= BS_DONTKICKVOICES; + alog("%s: %s!%s@%s set DONTKICKVOICES on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_DONTKICKVOICES_ON, ci->name); } else if (!stricmp(value, "OFF")) { ci->botflags &= ~BS_DONTKICKVOICES; + alog("%s: %s!%s@%s unset DONTKICKVOICES on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_DONTKICKVOICES_OFF, ci->name); } else { @@ -157,9 +169,13 @@ int do_set(User * u) } else if (!stricmp(option, "FANTASY")) { if (!stricmp(value, "ON")) { ci->botflags |= BS_FANTASY; + alog("%s: %s!%s@%s set FANTASY on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_FANTASY_ON, ci->name); } else if (!stricmp(value, "OFF")) { ci->botflags &= ~BS_FANTASY; + alog("%s: %s!%s@%s unset FANTASY on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_FANTASY_OFF, ci->name); } else { syntax_error(s_BotServ, u, "SET FANTASY", @@ -168,9 +184,13 @@ int do_set(User * u) } else if (!stricmp(option, "GREET")) { if (!stricmp(value, "ON")) { ci->botflags |= BS_GREET; + alog("%s: %s!%s@%s set GREET on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_GREET_ON, ci->name); } else if (!stricmp(value, "OFF")) { ci->botflags &= ~BS_GREET; + alog("%s: %s!%s@%s unset GREET on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_GREET_OFF, ci->name); } else { syntax_error(s_BotServ, u, "SET GREET", @@ -181,9 +201,13 @@ int do_set(User * u) ci->botflags |= BS_NOBOT; if (ci->bi) unassign(u, ci); + alog("%s: %s!%s@%s set NOBOT on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_NOBOT_ON, ci->name); } else if (!stricmp(value, "OFF")) { ci->botflags &= ~BS_NOBOT; + alog("%s: %s!%s@%s unset NOBOT on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_NOBOT_OFF, ci->name); } else { syntax_error(s_BotServ, u, "SET NOBOT", @@ -192,9 +216,13 @@ int do_set(User * u) } else if (!stricmp(option, "SYMBIOSIS")) { if (!stricmp(value, "ON")) { ci->botflags |= BS_SYMBIOSIS; + alog("%s: %s!%s@%s set SYMBIOSIS on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_SYMBIOSIS_ON, ci->name); } else if (!stricmp(value, "OFF")) { ci->botflags &= ~BS_SYMBIOSIS; + alog("%s: %s!%s@%s unset SYMBIOSIS on %s", + s_BotServ, u->nick, u->username, u->host, ci->name); notice_lang(s_BotServ, u, BOT_SET_SYMBIOSIS_OFF, ci->name); } else { syntax_error(s_BotServ, u, "SET SYMBIOSIS", diff --git a/src/core/bs_unassign.c b/src/core/bs_unassign.c index da2fd6f7d..11d1a90ef 100644 --- a/src/core/bs_unassign.c +++ b/src/core/bs_unassign.c @@ -82,6 +82,8 @@ int do_unassign(User * u) else if (!ci->bi) notice_help(s_BotServ, u, BOT_NOT_ASSIGNED); else { + alog("%s: %s!%s@%s unassigned bot %s from %s", s_BotServ, u->nick, u->username, + u->host, ci->bi->nick, ci->name); unassign(u, ci); notice_lang(s_BotServ, u, BOT_UNASSIGN_UNASSIGNED, ci->name); } diff --git a/src/core/cs_akick.c b/src/core/cs_akick.c index 167bc8651..44511a7c1 100644 --- a/src/core/cs_akick.c +++ b/src/core/cs_akick.c @@ -357,6 +357,8 @@ int do_akick(User * u) cu = next; } } + alog("%s: %s!%s@%s added akick for %s to %s", + s_ChanServ, u->nick, u->username, u->host, mask, chan); notice_lang(s_ChanServ, u, CHAN_AKICK_ADDED, mask, chan); if (count) @@ -397,6 +399,8 @@ int do_akick(User * u) } akick->flags |= AK_STUCK; + alog("%s: %s!%s@%s set STICK on akick %s on %s", + s_ChanServ, u->nick, u->username, u->host, akick->u.mask, ci->name); notice_lang(s_ChanServ, u, CHAN_AKICK_STUCK, akick->u.mask, ci->name); @@ -433,6 +437,8 @@ int do_akick(User * u) } akick->flags &= ~AK_STUCK; + alog("%s: %s!%s@%s unset STICK on akick %s on %s", + s_ChanServ, u->nick, u->username, u->host, akick->u.mask, ci->name); notice_lang(s_ChanServ, u, CHAN_AKICK_UNSTUCK, akick->u.mask, ci->name); @@ -463,9 +469,14 @@ int do_akick(User * u) ci->name); } } else if (deleted == 1) { + alog("%s: %s!%s@%s deleted 1 akick on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_AKICK_DELETED_ONE, ci->name); } else { + alog("%s: %s!%s@%s deleted %d akicks on %s", + s_ChanServ, u->nick, u->username, u->host, deleted, + ci->name); notice_lang(s_ChanServ, u, CHAN_AKICK_DELETED_SEVERAL, deleted, ci->name); } @@ -487,6 +498,8 @@ int do_akick(User * u) chan); return MOD_CONT; } + alog("%s: %s!%s@%s deleted akick %s on %s", + s_ChanServ, u->nick, u->username, u->host, mask, chan); notice_lang(s_ChanServ, u, CHAN_AKICK_DELETED, mask, chan); akick_del(u, akick); deleted = 1; @@ -645,6 +658,8 @@ int do_akick(User * u) ci->akick = NULL; ci->akickcount = 0; + alog("%s: %s!%s@%s cleared akicks on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_AKICK_CLEAR, ci->name); } else { diff --git a/src/core/cs_clear.c b/src/core/cs_clear.c index 70f01729d..efaba0e5f 100644 --- a/src/core/cs_clear.c +++ b/src/core/cs_clear.c @@ -98,6 +98,8 @@ int do_clear(User * u) } } + alog("%s: %s!%s@%s cleared bans on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_CLEARED_BANS, chan); } else if (ircd->except && stricmp(what, "excepts") == 0) { char *av[2]; @@ -114,8 +116,10 @@ int do_clear(User * u) free(av[1]); } } - notice_lang(s_ChanServ, u, CHAN_CLEARED_EXCEPTS, chan); + alog("%s: %s!%s@%s cleared excepts on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); + notice_lang(s_ChanServ, u, CHAN_CLEARED_EXCEPTS, chan); } else if (ircd->invitemode && stricmp(what, "invites") == 0) { char *av[2]; Entry *invite, *next; @@ -131,6 +135,8 @@ int do_clear(User * u) free(av[1]); } } + alog("%s: %s!%s@%s cleared invites on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_CLEARED_INVITES, chan); } else if (stricmp(what, "modes") == 0) { @@ -178,6 +184,8 @@ int do_clear(User * u) check_modes(c); } + alog("%s: %s!%s@%s cleared modes on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_CLEARED_MODES, chan); } else if (stricmp(what, "ops") == 0) { char *av[6]; /* The max we have to hold: chan, ts, modes(max3), nick, nick, nick */ @@ -236,6 +244,9 @@ int do_clear(User * u) do_cmode(s_ChanServ, ac, av); } } + + alog("%s: %s!%s@%s cleared ops on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_CLEARED_OPS, chan); } else if (ircd->halfop && stricmp(what, "hops") == 0) { char *av[4]; @@ -285,6 +296,8 @@ int do_clear(User * u) } } } + alog("%s: %s!%s@%s cleared halfops on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_CLEARED_HOPS, chan); } else if (stricmp(what, "voices") == 0) { char *av[4]; @@ -335,6 +348,8 @@ int do_clear(User * u) } } } + alog("%s: %s!%s@%s cleared voices on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_CLEARED_VOICES, chan); } else if (stricmp(what, "users") == 0) { char *av[3]; @@ -354,6 +369,8 @@ int do_clear(User * u) free(av[1]); free(av[0]); } + alog("%s: %s!%s@%s cleared users on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_CLEARED_USERS, chan); } else { syntax_error(s_ChanServ, u, "CLEAR", CHAN_CLEAR_SYNTAX); diff --git a/src/core/cs_getkey.c b/src/core/cs_getkey.c index 8caf09ba3..a86c0a445 100644 --- a/src/core/cs_getkey.c +++ b/src/core/cs_getkey.c @@ -81,6 +81,8 @@ int do_getkey(User * u) } else if (!ci->c || !ci->c->key) { notice_lang(s_ChanServ, u, CHAN_GETKEY_NOKEY, chan); } else { + alog("%s: %s!%s@%s used GETKEY on %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_GETKEY_KEY, chan, ci->c->key); } diff --git a/src/core/cs_set.c b/src/core/cs_set.c index f29176b3f..01297eff4 100644 --- a/src/core/cs_set.c +++ b/src/core/cs_set.c @@ -412,6 +412,8 @@ int do_set_desc(User * u, ChannelInfo * ci, char *param) if (ci->desc) free(ci->desc); ci->desc = sstrdup(param); + alog("%s: %s!%s@%s set description of %s to: %s", + s_ChanServ, u->nick, u->username, u->host, ci->name, ci->desc); notice_lang(s_ChanServ, u, CHAN_DESC_CHANGED, ci->name, param); return MOD_CONT; } @@ -424,9 +426,13 @@ int do_set_url(User * u, ChannelInfo * ci, char *param) free(ci->url); if (param) { ci->url = sstrdup(param); + alog("%s: %s!%s@%s set url for %s to: %s", + s_ChanServ, u->nick, u->username, u->host, ci->name, ci->url); notice_lang(s_ChanServ, u, CHAN_URL_CHANGED, ci->name, param); } else { ci->url = NULL; + alog("%s: %s!%s@%s unset url for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_URL_UNSET, ci->name); } return MOD_CONT; @@ -440,9 +446,13 @@ int do_set_email(User * u, ChannelInfo * ci, char *param) free(ci->email); if (param) { ci->email = sstrdup(param); + alog("%s: %s!%s@%s set email for %s to: %s", + s_ChanServ, u->nick, u->username, u->host, ci->name, ci->email); notice_lang(s_ChanServ, u, CHAN_EMAIL_CHANGED, ci->name, param); } else { ci->email = NULL; + alog("%s: %s!%s@%s unset email for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_EMAIL_UNSET, ci->name); } return MOD_CONT; @@ -456,10 +466,14 @@ int do_set_entrymsg(User * u, ChannelInfo * ci, char *param) free(ci->entry_message); if (param) { ci->entry_message = sstrdup(param); + alog("%s: %s!%s@%s set entrymsg for %s to: %s", + s_ChanServ, u->nick, u->username, u->host, ci->name, ci->entry_message); notice_lang(s_ChanServ, u, CHAN_ENTRY_MSG_CHANGED, ci->name, param); } else { ci->entry_message = NULL; + alog("%s: %s!%s@%s unset entrymsg for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_ENTRY_MSG_UNSET, ci->name); } return MOD_CONT; @@ -553,6 +567,8 @@ int do_set_mlock(User * u, ChannelInfo * ci, char *param) * mode lock at all. */ if (get_mlock_modes(ci, 0)) { + alog("%s: %s!%s@%s set mlock for %s to: %s", + s_ChanServ, u->nick, u->username, u->host, ci->name, get_mlock_modes(ci, 0)); notice_lang(s_ChanServ, u, CHAN_MLOCK_CHANGED, ci->name, get_mlock_modes(ci, 0)); } @@ -575,6 +591,8 @@ int do_set_bantype(User * u, ChannelInfo * ci, char *param) notice_lang(s_ChanServ, u, CHAN_SET_BANTYPE_INVALID, param); } else { ci->bantype = bantype; + alog("%s: %s!%s@%s set ban type for %s to: %s", + s_ChanServ, u->nick, u->username, u->host, ci->name, ci->bantype); notice_lang(s_ChanServ, u, CHAN_SET_BANTYPE_CHANGED, ci->name, ci->bantype); } @@ -587,9 +605,13 @@ int do_set_keeptopic(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_KEEPTOPIC; + alog("%s: %s!%s@%s set keeptopic ON for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_KEEPTOPIC_ON, ci->name); } else if (stricmp(param, "OFF") == 0) { ci->flags &= ~CI_KEEPTOPIC; + alog("%s: %s!%s@%s set keeptopic OFF for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_KEEPTOPIC_OFF, ci->name); } else { syntax_error(s_ChanServ, u, "SET KEEPTOPIC", @@ -604,9 +626,13 @@ int do_set_topiclock(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_TOPICLOCK; + alog("%s: %s!%s@%s set topiclock ON for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_TOPICLOCK_ON, ci->name); } else if (stricmp(param, "OFF") == 0) { ci->flags &= ~CI_TOPICLOCK; + alog("%s: %s!%s@%s set topiclock OFF for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_TOPICLOCK_OFF, ci->name); } else { syntax_error(s_ChanServ, u, "SET TOPICLOCK", @@ -621,9 +647,13 @@ int do_set_private(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_PRIVATE; + alog("%s: %s!%s@%s set private ON for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_PRIVATE_ON, ci->name); } else if (stricmp(param, "OFF") == 0) { ci->flags &= ~CI_PRIVATE; + alog("%s: %s!%s@%s set private OFF for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_PRIVATE_OFF, ci->name); } else { syntax_error(s_ChanServ, u, "SET PRIVATE", @@ -638,9 +668,13 @@ int do_set_secureops(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_SECUREOPS; + alog("%s: %s!%s@%s set secureops ON for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_SECUREOPS_ON, ci->name); } else if (stricmp(param, "OFF") == 0) { ci->flags &= ~CI_SECUREOPS; + alog("%s: %s!%s@%s set secureops OFF for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_SECUREOPS_OFF, ci->name); } else { syntax_error(s_ChanServ, u, "SET SECUREOPS", @@ -655,9 +689,13 @@ int do_set_securefounder(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_SECUREFOUNDER; + alog("%s: %s!%s@%s set securefounder ON for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_SECUREFOUNDER_ON, ci->name); } else if (stricmp(param, "OFF") == 0) { ci->flags &= ~CI_SECUREFOUNDER; + alog("%s: %s!%s@%s set securefounder OFF for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_SECUREFOUNDER_OFF, ci->name); } else { syntax_error(s_ChanServ, u, "SET SECUREFOUNDER", @@ -674,11 +712,15 @@ int do_set_restricted(User * u, ChannelInfo * ci, char *param) ci->flags |= CI_RESTRICTED; if (ci->levels[CA_NOJOIN] < 0) ci->levels[CA_NOJOIN] = 0; + alog("%s: %s!%s@%s set restricted ON for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_RESTRICTED_ON, ci->name); } else if (stricmp(param, "OFF") == 0) { ci->flags &= ~CI_RESTRICTED; if (ci->levels[CA_NOJOIN] >= 0) ci->levels[CA_NOJOIN] = -2; + alog("%s: %s!%s@%s set restricted OFF for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_RESTRICTED_OFF, ci->name); } else { syntax_error(s_ChanServ, u, "SET RESTRICTED", @@ -693,9 +735,13 @@ int do_set_secure(User * u, ChannelInfo * ci, char *param) { if (stricmp(param, "ON") == 0) { ci->flags |= CI_SECURE; + alog("%s: %s!%s@%s set secure ON for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_SECURE_ON, ci->name); } else if (stricmp(param, "OFF") == 0) { ci->flags &= ~CI_SECURE; + alog("%s: %s!%s@%s set secure OFF for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_SECURE_OFF, ci->name); } else { syntax_error(s_ChanServ, u, "SET SECURE", CHAN_SET_SECURE_SYNTAX); @@ -710,13 +756,19 @@ int do_set_signkick(User * u, ChannelInfo * ci, char *param) if (stricmp(param, "ON") == 0) { ci->flags |= CI_SIGNKICK; ci->flags &= ~CI_SIGNKICK_LEVEL; + alog("%s: %s!%s@%s set signkick ON for %s", + s_ChanServ, u->nick, u->username, u->host, ci->name); notice_lang(s_ChanServ, u, CHAN_SET_SIGNKICK_ON, ci->name); } else if (stricmp(param, "LEVEL") == 0) { ci->flags |= CI_SIGNKICK_LEVEL; ci->flags &= ~CI_SIGNKICK; |
