diff options
author | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-03-07 01:56:32 +0000 |
---|---|---|
committer | trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b <trystan trystan@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864> | 2005-03-07 01:56:32 +0000 |
commit | 84a39def3dcd8d7c7a7cc45e7b7a07fe6c56060a (patch) | |
tree | 4b7c5feb9ecd0890c066dfe4ff24098d8d203804 /src | |
parent | cd81294abfbab9d5ba070938265b0ac21cc15241 (diff) |
BUILD : 1.7.8 (602) BUGS : 308, 311 NOTES : Fixed a couple of bugs, some smelling errors, and only in debug will nonexistent warnings display
git-svn-id: svn://svn.anope.org/anope/trunk@602 31f1291d-b8d6-0310-a050-a5561fc1590b
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@450 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/channels.c | 76 | ||||
-rw-r--r-- | src/chanserv.c | 7 | ||||
-rw-r--r-- | src/hybrid.c | 6 | ||||
-rw-r--r-- | src/operserv.c | 3 | ||||
-rw-r--r-- | src/plexus.c | 9 | ||||
-rw-r--r-- | src/ptlink.c | 4 | ||||
-rw-r--r-- | src/rageircd.c | 3 | ||||
-rw-r--r-- | src/ratbox.c | 12 | ||||
-rw-r--r-- | src/shadowircd.c | 12 | ||||
-rw-r--r-- | src/solidircd.c | 4 | ||||
-rw-r--r-- | src/ultimate2.c | 23 | ||||
-rw-r--r-- | src/ultimate3.c | 19 | ||||
-rw-r--r-- | src/unreal31.c | 23 | ||||
-rw-r--r-- | src/unreal32.c | 25 | ||||
-rw-r--r-- | src/viagra.c | 27 |
15 files changed, 182 insertions, 71 deletions
diff --git a/src/channels.c b/src/channels.c index 9e9cef915..48374a02b 100644 --- a/src/channels.c +++ b/src/channels.c @@ -182,6 +182,7 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av, CUMode *cum; unsigned char botmode = 0; BotInfo *bi; + char *lastnick = NULL; if (debug) alog("debug: Changing modes for %s to %s", chan->name, @@ -235,8 +236,10 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av, } if (!(user = finduser(*av))) { - alog("channel: MODE %s %c%c for nonexistent user %s", - chan->name, (add ? '+' : '-'), mode, *av); + if (debug) { + alog("channel: MODE %s %c%c for nonexistent user %s", + chan->name, (add ? '+' : '-'), mode, *av); + } continue; } @@ -273,7 +276,14 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av, alog("debug: Modes already sent calling remove_user_status() to clean up"); } chan_remove_user_status(chan, user, cum->status); - check = 2; + if (!lastnick) { + check = 2; + lastnick = sstrdup(user->nick); + } else { + if (stricmp(user->nick, lastnick)) { + check = 1; + } + } continue; } else { chan_set_user_status(chan, user, cum->status); @@ -529,8 +539,10 @@ void do_join(const char *source, int ac, char **av) user = finduser(source); } if (!user) { - alog("user: JOIN from nonexistent user %s: %s", source, - merge_args(ac, av)); + if (debug) { + alog("user: JOIN from nonexistent user %s: %s", source, + merge_args(ac, av)); + } return; } @@ -612,8 +624,10 @@ void do_kick(const char *source, int ac, char **av) user = finduser(s); } if (!user) { - alog("user: KICK for nonexistent user %s on %s: %s", s, av[0], - merge_args(ac - 2, av + 2)); + if (debug) { + alog("user: KICK for nonexistent user %s on %s: %s", s, + av[0], merge_args(ac - 2, av + 2)); + } continue; } if (debug) { @@ -653,8 +667,10 @@ void do_part(const char *source, int ac, char **av) user = finduser(source); if (!user) { - alog("user: PART from nonexistent user %s: %s", source, - merge_args(ac, av)); + if (debug) { + alog("user: PART from nonexistent user %s: %s", source, + merge_args(ac, av)); + } return; } t = av[0]; @@ -798,8 +814,10 @@ void do_sjoin(const char *source, int ac, char **av) user = finduser(s); } if (!user) { - alog("user: SJOIN for nonexistent user %s on %s", s, - av[1]); + if (debug) { + alog("user: SJOIN for nonexistent user %s on %s", s, + av[1]); + } return; } @@ -867,8 +885,10 @@ void do_sjoin(const char *source, int ac, char **av) user = finduser(s); if (!user) { - alog("user: SJOIN for nonexistent user %s on %s", s, - av[1]); + if (debug) { + alog("user: SJOIN for nonexistent user %s on %s", s, + av[1]); + } return; } @@ -934,8 +954,10 @@ void do_sjoin(const char *source, int ac, char **av) user = finduser(s); } if (!user) { - alog("user: SJOIN for nonexistent user %s on %s", s, - av[1]); + if (debug) { + alog("user: SJOIN for nonexistent user %s on %s", s, + av[1]); + } return; } @@ -979,8 +1001,10 @@ void do_sjoin(const char *source, int ac, char **av) user = finduser(source); } if (!user) { - alog("user: SJOIN for nonexistent user %s on %s", source, - av[1]); + if (debug) { + alog("user: SJOIN for nonexistent user %s on %s", source, + av[1]); + } return; } @@ -1050,8 +1074,10 @@ void do_cmode(const char *source, int ac, char **av) if (!chan) { ci = cs_findchan(av[0]); if (!(ci && (ci->flags & CI_VERBOTEN))) - alog("channel: MODE %s for nonexistent channel %s", - merge_args(ac - 1, av + 1), av[0]); + if (debug) { + alog("channel: MODE %s for nonexistent channel %s", + merge_args(ac - 1, av + 1), av[0]); + } return; } @@ -1091,8 +1117,10 @@ void do_topic(const char *source, int ac, char **av) topic_time = ts; if (!c) { - alog("channel: TOPIC %s for nonexistent channel %s", - merge_args(ac - 1, av + 1), av[0]); + if (debug) { + alog("channel: TOPIC %s for nonexistent channel %s", + merge_args(ac - 1, av + 1), av[0]); + } return; } @@ -1235,8 +1263,10 @@ void chan_adduser2(User * user, Channel * c) } /** - * We let the bot join even if it was an ignored user, as if we dont, and the ignored user dosnt just leave, the bot will never - * make it into the channel, leaving the channel botless even for legit users - Rob + * We let the bot join even if it was an ignored user, as if we don't, + * and the ignored user dosnt just leave, the bot will never + * make it into the channel, leaving the channel botless even for + * legit users - Rob **/ if (s_BotServ && c->ci && c->ci->bi) { if (c->usercount == BSMinUsers) diff --git a/src/chanserv.c b/src/chanserv.c index e011eb077..713aaaf85 100644 --- a/src/chanserv.c +++ b/src/chanserv.c @@ -5752,6 +5752,11 @@ static int do_ban(User * u) u->nick, ci->name); continue; } + if (is_protected(u)) { + notice_lang(s_ChanServ, u, PERMISSION_DENIED); + continue; + } + av[0] = sstrdup("+b"); get_idealban(ci, u, mask, sizeof(mask)); av[1] = mask; @@ -5802,6 +5807,8 @@ static int do_ban(User * u) */ } else if (ircd->except && is_excepted(ci, u2)) { notice_lang(s_ChanServ, u, CHAN_EXCEPTED, u2->nick, ci->name); + } else if (ircd->protectedumode && is_protected(u2)) { + notice_lang(s_ChanServ, u, PERMISSION_DENIED); } else { char *av[3]; char mask[BUFSIZE]; diff --git a/src/hybrid.c b/src/hybrid.c index cce2c246a..f4cb41c65 100644 --- a/src/hybrid.c +++ b/src/hybrid.c @@ -575,8 +575,10 @@ int anope_event_topic(char *source, int ac, char **av) time_t topic_time = time(NULL); if (!c) { - alog("channel: TOPIC %s for nonexistent channel %s", - merge_args(ac - 1, av + 1), av[0]); + if (debug) { + alog("channel: TOPIC %s for nonexistent channel %s", + merge_args(ac - 1, av + 1), av[0]); + } return MOD_CONT; } diff --git a/src/operserv.c b/src/operserv.c index 744038866..1f4e650c3 100644 --- a/src/operserv.c +++ b/src/operserv.c @@ -5026,8 +5026,8 @@ static int do_defcon(User * u) notice_lang(s_OperServ, u, OPER_DEFCON_SYNTAX); return MOD_CONT; } - DefConLevel = newLevel; + send_event("EVENT_DEFCON_LEVEL", "%d", DefConLevel); DefContimer = time(NULL); notice_lang(s_OperServ, u, OPER_DEFCON_CHANGED, DefConLevel); defcon_sendlvls(u); @@ -5123,6 +5123,7 @@ void resetDefCon(int level) if ((DefContimer) && (time(NULL) - DefContimer >= dotime(DefConTimeOut))) { DefConLevel = level; + send_event("EVENT_DEFCON_LEVEL", "%d", DefConLevel); alog("Defcon level timeout, returning to lvl %d", level); anope_cmd_global(s_OperServ, getstring2(NULL, OPER_DEFCON_WALL), diff --git a/src/plexus.c b/src/plexus.c index 74124154a..06f1f0b70 100644 --- a/src/plexus.c +++ b/src/plexus.c @@ -636,8 +636,10 @@ int anope_event_topic(char *source, int ac, char **av) time_t topic_time = time(NULL); if (!c) { - alog("channel: TOPIC %s for nonexistent channel %s", - merge_args(ac - 1, av + 1), av[0]); + if (debug) { + alog("channel: TOPIC %s for nonexistent channel %s", + merge_args(ac - 1, av + 1), av[0]); + } return MOD_CONT; } @@ -954,8 +956,9 @@ int anope_event_sethost(char *source, int ac, char **av) u = finduser(source); if (!u) { - if (debug) + if (debug) { alog("user: SETHOST for nonexistent user %s", source); + } return MOD_CONT; } diff --git a/src/ptlink.c b/src/ptlink.c index a64076243..f6c9e6a7d 100644 --- a/src/ptlink.c +++ b/src/ptlink.c @@ -432,7 +432,9 @@ int anope_event_newmask(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: NEWMASK for nonexistent user %s", av[0]); + if (debug) { + alog("user: NEWMASK for nonexistent user %s", av[0]); + } return MOD_CONT; } diff --git a/src/rageircd.c b/src/rageircd.c index 800b04104..453d18591 100644 --- a/src/rageircd.c +++ b/src/rageircd.c @@ -450,8 +450,9 @@ int anope_event_vhost(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - if (debug) + if (debug) { alog("user: VHOST for nonexistent user %s", av[0]); + } return MOD_CONT; } diff --git a/src/ratbox.c b/src/ratbox.c index 47a36d7f3..38ea060b2 100644 --- a/src/ratbox.c +++ b/src/ratbox.c @@ -643,8 +643,10 @@ int anope_event_topic(char *source, int ac, char **av) time_t topic_time = time(NULL); if (!c) { - alog("channel: TOPIC %s for nonexistent channel %s", - merge_args(ac - 1, av + 1), av[0]); + if (debug) { + alog("channel: TOPIC %s for nonexistent channel %s", + merge_args(ac - 1, av + 1), av[0]); + } return MOD_CONT; } @@ -691,8 +693,10 @@ int anope_event_tburst(char *source, int ac, char **av) topic_time = strtol(av[1], NULL, 10); if (!c) { - alog("channel: TOPIC %s for nonexistent channel %s", - merge_args(ac - 1, av + 1), av[0]); + if (debug) { + alog("channel: TOPIC %s for nonexistent channel %s", + merge_args(ac - 1, av + 1), av[0]); + } return MOD_CONT; } diff --git a/src/shadowircd.c b/src/shadowircd.c index b454dc618..df27f88bd 100644 --- a/src/shadowircd.c +++ b/src/shadowircd.c @@ -651,8 +651,10 @@ int anope_event_topic(char *source, int ac, char **av) time_t topic_time = time(NULL); if (!c) { - alog("channel: TOPIC %s for nonexistent channel %s", - merge_args(ac - 1, av + 1), av[0]); + if (debug) { + alog("channel: TOPIC %s for nonexistent channel %s", + merge_args(ac - 1, av + 1), av[0]); + } return MOD_CONT; } @@ -695,8 +697,10 @@ int anope_event_tburst(char *source, int ac, char **av) topic_time = strtol(av[1], NULL, 10); if (!c) { - alog("channel: TOPIC %s for nonexistent channel %s", - merge_args(ac - 1, av + 1), av[0]); + if (debug) { + alog("channel: TOPIC %s for nonexistent channel %s", + merge_args(ac - 1, av + 1), av[0]); + } return MOD_CONT; } diff --git a/src/solidircd.c b/src/solidircd.c index 9603154f4..6283ce30e 100644 --- a/src/solidircd.c +++ b/src/solidircd.c @@ -721,7 +721,9 @@ int anope_event_vs(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: SVHOST for nonexistent user %s", av[0]); + if (debug) { + alog("user: SVHOST for nonexistent user %s", av[0]); + } return MOD_CONT; } diff --git a/src/ultimate2.c b/src/ultimate2.c index 99292199e..ad72972c7 100644 --- a/src/ultimate2.c +++ b/src/ultimate2.c @@ -454,7 +454,9 @@ int anope_event_setname(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETNAME for nonexistent user %s", source); + if (debug) { + alog("user: SETNAME for nonexistent user %s", source); + } return MOD_CONT; } @@ -471,7 +473,9 @@ int anope_event_chgname(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGNAME for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGNAME for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -488,7 +492,9 @@ int anope_event_setident(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETIDENT for nonexistent user %s", source); + if (debug) { + alog("user: SETIDENT for nonexistent user %s", source); + } return MOD_CONT; } @@ -505,7 +511,9 @@ int anope_event_chgident(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGIDENT for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGIDENT for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -522,8 +530,9 @@ int anope_event_sethost(char *source, int ac, char **av) u = finduser(source); if (!u) { - if (debug) + if (debug) { alog("user: SETHOST for nonexistent user %s", source); + } return MOD_CONT; } @@ -558,7 +567,9 @@ int anope_event_chghost(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGHOST for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGHOST for nonexistent user %s", av[0]); + } return MOD_CONT; } diff --git a/src/ultimate3.c b/src/ultimate3.c index b8cd2327e..bbe292195 100644 --- a/src/ultimate3.c +++ b/src/ultimate3.c @@ -543,8 +543,9 @@ int anope_event_sethost(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - if (debug) + if (debug) { alog("user: SETHOST for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -934,7 +935,9 @@ int anope_event_setname(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETNAME for nonexistent user %s", source); + if (debug) { + alog("user: SETNAME for nonexistent user %s", source); + } return MOD_CONT; } @@ -951,7 +954,9 @@ int anope_event_chgname(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGNAME for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGNAME for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -968,7 +973,9 @@ int anope_event_setident(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETIDENT for nonexistent user %s", source); + if (debug) { + alog("user: SETIDENT for nonexistent user %s", source); + } return MOD_CONT; } @@ -984,7 +991,9 @@ int anope_event_chgident(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGIDENT for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGIDENT for nonexistent user %s", av[0]); + } return MOD_CONT; } diff --git a/src/unreal31.c b/src/unreal31.c index 43c81fbd4..cbdc77276 100644 --- a/src/unreal31.c +++ b/src/unreal31.c @@ -1262,7 +1262,9 @@ int anope_event_setname(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETNAME for nonexistent user %s", source); + if (debug) { + alog("user: SETNAME for nonexistent user %s", source); + } return MOD_CONT; } @@ -1279,7 +1281,9 @@ int anope_event_chgname(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGNAME for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGNAME for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -1296,7 +1300,9 @@ int anope_event_setident(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETIDENT for nonexistent user %s", source); + if (debug) { + alog("user: SETIDENT for nonexistent user %s", source); + } return MOD_CONT; } @@ -1312,7 +1318,9 @@ int anope_event_chgident(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGIDENT for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGIDENT for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -1329,8 +1337,9 @@ int anope_event_sethost(char *source, int ac, char **av) u = finduser(source); if (!u) { - if (debug) + if (debug) { alog("user: SETHOST for nonexistent user %s", source); + } return MOD_CONT; } @@ -1378,7 +1387,9 @@ int anope_event_chghost(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGHOST for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGHOST for nonexistent user %s", av[0]); + } return MOD_CONT; } diff --git a/src/unreal32.c b/src/unreal32.c index 0e45ebe3a..f65223009 100644 --- a/src/unreal32.c +++ b/src/unreal32.c @@ -69,7 +69,7 @@ IRCDVar ircd[] = { 1, /* Has exceptions +e */ 1, /* TS Topic Forward */ 0, /* TS Topci Backward */ - 0, /* Protected Umode */ + UMODE_S, /* Protected Umode */ 0, /* Has Admin */ 0, /* Chan SQlines */ 0, /* Quit on Kill */ @@ -1715,7 +1715,9 @@ int anope_event_setname(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETNAME for nonexistent user %s", source); + if (debug) { + alog("user: SETNAME for nonexistent user %s", source); + } return MOD_CONT; } @@ -1732,7 +1734,9 @@ int anope_event_chgname(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGNAME for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGNAME for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -1749,7 +1753,9 @@ int anope_event_setident(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETIDENT for nonexistent user %s", source); + if (debug) { + alog("user: SETIDENT for nonexistent user %s", source); + } return MOD_CONT; } @@ -1765,7 +1771,9 @@ int anope_event_chgident(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGIDENT for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGIDENT for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -1782,8 +1790,9 @@ int anope_event_sethost(char *source, int ac, char **av) u = finduser(source); if (!u) { - if (debug) + if (debug) { alog("user: SETHOST for nonexistent user %s", source); + } return MOD_CONT; } @@ -1871,7 +1880,9 @@ int anope_event_chghost(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGHOST for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGHOST for nonexistent user %s", av[0]); + } return MOD_CONT; } diff --git a/src/viagra.c b/src/viagra.c index c234aa67c..1fc447cdb 100644 --- a/src/viagra.c +++ b/src/viagra.c @@ -438,7 +438,9 @@ int anope_event_setname(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETNAME for nonexistent user %s", source); + if (debug) { + alog("user: SETNAME for nonexistent user %s", source); + } return MOD_CONT; } @@ -461,7 +463,9 @@ int anope_event_chgname(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGNAME for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGNAME for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -478,7 +482,9 @@ int anope_event_setident(char *source, int ac, char **av) u = finduser(source); if (!u) { - alog("user: SETIDENT for nonexistent user %s", source); + if (debug) { + alog("user: SETIDENT for nonexistent user %s", source); + } return MOD_CONT; } @@ -495,7 +501,9 @@ int anope_event_chgident(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGIDENT for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGIDENT for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -517,8 +525,9 @@ int anope_event_sethost(char *source, int ac, char **av) u = finduser(source); if (!u) { - if (debug) + if (debug) { alog("user: SETHOST for nonexistent user %s", source); + } return MOD_CONT; } @@ -553,7 +562,9 @@ int anope_event_vs(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: VS for nonexistent user %s", av[0]); + if (debug) { + alog("user: VS for nonexistent user %s", av[0]); + } return MOD_CONT; } @@ -571,7 +582,9 @@ int anope_event_chghost(char *source, int ac, char **av) u = finduser(av[0]); if (!u) { - alog("user: CHGHOST for nonexistent user %s", av[0]); + if (debug) { + alog("user: CHGHOST for nonexistent user %s", av[0]); + } return MOD_CONT; } |