]> jfr.im git - irc/evilnet/x3.git/commitdiff
bug fix for triggers not working with forwards as well as off channel services
authorsirvulcan <redacted>
Fri, 29 May 2009 23:13:36 +0000 (23:13 +0000)
committersirvulcan <redacted>
Fri, 29 May 2009 23:13:36 +0000 (23:13 +0000)
ChangeLog
src/hash.c
src/proto-common.c

index fad30ec26e87ff6ac72653ea9958ef98004b05e0..8d0293d5adc1820dddb90cfed780eae63a9b717f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,13 @@
 /***********************************************************************
 X3 ChangeLog
 
+2009-05-30  Neil Spierling  <sirvulcan@sirvulcan.co.nz>
+
+       * src/hash.c: Couple of tweaks.
+
+       * src/proto-common.c: Fix for triggers not working with forwards as well as
+       off channel services.
+
 2009-05-30  Neil Spierling  <sirvulcan@sirvulcan.co.nz>
 
        * src/chanserv.c: Fixed a crash with setting a .set option with an invalid
index f1a043d74ad5c410625999ec17cff215435a5a5d..4fa4f51b5483369f099baa83eebf22c2cda09d1c 100644 (file)
@@ -619,14 +619,16 @@ AddChannelUser(struct userNode *user, struct chanNode* channel)
 
         if (channel->members.used == 1
             && !(channel->modes & MODE_REGISTERED)
-            && !(channel->modes & MODE_APASS))
+            && !(channel->modes & MODE_APASS)) {
             mNode->modes |= MODE_CHANOP;
+            log_module(MAIN_LOG, LOG_DEBUG, "setting op");
+        }
 
         if (IsLocal(user)) {
             irc_join(user, channel);
         }
 
-        for (n=0; n<jf_used; n++) {
+        for (n=0; (n<jf_used) && !user->dead; n++) {
             /* Callbacks return true if they kick or kill the user,
              * and we can continue without removing mNode. */
             if (jf_list[n](mNode))
index b7d8ee20d47e4d4dacb231c7d9c8ea6df6eefa06..467462f2aa3f1c5f0e258b16f63eee8870142a77 100644 (file)
@@ -444,8 +444,8 @@ privmsg_chan_helper(struct chanNode *cn, void *data)
 
     /* Never send a NOTICE to a channel to one of the services */
     cf = &chanmsg_funcs[(unsigned char)pd->text[0]];
-    if (cf->func && !pd->is_notice
-        && GetUserMode(cn, cf->service) && !IsDeaf(cf->service))
+    if (!pd->is_notice && cf->func
+        && ((cn->modes & MODE_REGISTERED) || GetUserMode(cn, cf->service)))
         cf->func(pd->user, cn, pd->text+1, cf->service, pd->is_notice);
     else
         spamserv_channel_message(cn, pd->user, pd->text);