Parcourir la source

* Fixed getin system continuing to parse for bans and assorted requests when bot wasn't even opped.
* Really need to re-write this stuff.


svn: 1637

Bryan Drewery il y a 21 ans
Parent
commit
b80622b7b9
2 fichiers modifiés avec 7 ajouts et 4 suppressions
  1. 1 0
      doc/UPDATES
  2. 6 4
      src/mod/irc.mod/irc.c

+ 1 - 0
doc/UPDATES

@@ -24,6 +24,7 @@ This is a summary of ChangeLog basically.
 * Fixed dns queries returning invalid (compressed) results for reverses.
 * Fixed some other relay segfaults and stack smashings (one from eggdrop).
 * Fixed ipv6 bots connecting over ipv4.
+* Fixed getin system continuing to parse for bans and assorted requests when bot wasn't even opped.
 
 1.2
 * No longer displaying SALTS on ./bin -v

+ 6 - 4
src/mod/irc.mod/irc.c

@@ -340,9 +340,10 @@ getin_request(char *botnick, char *code, char *par)
     p3 = newsplit(&p);
 
     if (strchr(p2, 'l')) {
-      if (!me_op(chan))
+      if (!me_op(chan)) {
         putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - I haven't got ops", botnick, nick, chan->dname);
-      else {
+        return;
+      } else {
         int lim = chan->channel.members + 5, curlim;
 
         if (!*p)
@@ -423,9 +424,10 @@ getin_request(char *botnick, char *code, char *par)
       free(tmp);
     }
     if (strchr(p2, 'i')) {
-      if (!me_op(chan))
+      if (!me_op(chan)) {
         putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - I haven't got ops", botnick, nick, chan->dname);
-      else {
+        return;
+      } else {
         sendi = 1;
         putlog(LOG_GETIN, "*", "inreq from %s/%s for %s - Invited", botnick, nick, chan->dname);
       }