]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Merge.
authorChris Porter <redacted>
Thu, 25 Mar 2010 15:13:43 +0000 (15:13 +0000)
committerChris Porter <redacted>
Thu, 25 Mar 2010 15:13:43 +0000 (15:13 +0000)
chanserv/chancmds/invite.c
chanserv/chanserv_messages.h
chanserv/chanservuser.c
helpmod2/helpmod2.c
lib/version.h
localuser/localuserchannel.c
localuser/localuserchannel.h
lua/luacommands.c

index 3b9f71982fc1365edd2362609f5ce6df6c6bf12c..69ee2eb0221e7066b27a31cf63e124733adf364e 100644 (file)
@@ -55,7 +55,7 @@ int csc_doinvite(void *source, int cargc, char **cargv) {
         continue;
       }
       
-      localinvite(chanservnick, rcup->chan->index->channel, sender);
+      localinvite(chanservnick, rcup->chan->index, sender);
     }
     
     chanservstdmessage(sender, QM_DONE);
@@ -67,7 +67,7 @@ int csc_doinvite(void *source, int cargc, char **cargv) {
     return CMD_ERROR;
 
   if (cip->channel) {
-    localinvite(chanservnick, cip->channel, sender);
+    localinvite(chanservnick, cip, sender);
   }
   chanservstdmessage(sender, QM_DONE);
  
index d2784ab31c56760b75a14d56c59600c7bb9447d6..696c69b2467899235ac80de1cc09626175307313 100644 (file)
@@ -65,7 +65,7 @@ BeginMessages() {
   msg(QM_NOTPROTECTED, "Sorry, your nick $0 is not protected.", "s"),
   msg(QM_SAMEAUTH, "$0 is authed as $1. Cannot reclaim nick.", "ss"),
   msg(QM_AUTHFAIL, "Username or password incorrect.", ""),
-  msg(QM_AUTHOK, "You are now logged in as $0.", "s"),
+  msg(QM_AUTHOK, "You are now logged in as $0.\nRemember: NO-ONE from QuakeNet will ever ask for your password.  NEVER send your password to ANYONE except Q@CServe.quakenet.org.", "s"),
   msg(QM_NEWACCOUNT, "Account $0 created successfully.\nInformation about how to access and use your new account will be sent to your email address, $1.\nIf you do not see an email soon be sure to check your spam folder.", "ss"),
   msg(QM_AUTHNAMEINUSE, "Someone already has the account name $0!\nIf this is your account use AUTH to login, otherwise please change your nick using /NICK and try again.", "s"),
   msg(QM_ALREADYONCHAN, "You're already on $0.", "s"),
index 8e6a2ef59e14f593267b40a665a03bbdd21dca75..7bbcd692cba9db674825e34a35c6591349837bbc 100644 (file)
@@ -787,7 +787,6 @@ void cs_doallautomodes(nick *np) {
           }
         }
 
-
        localsetmodeinit(&changes, rcup->chan->index->channel, chanservnick);
        if (*lp & CUMODE_OP) {
          if (!IsService(np) && (CUIsDeny(rcup) || (CIsBitch(rcup->chan) && !CUHasOpPriv(rcup))))
@@ -812,11 +811,16 @@ void cs_doallautomodes(nick *np) {
       } else {
        /* Channel exists but user is not joined: invite if they are +j-b */
        if (CUIsAutoInvite(rcup) && CUKnown(rcup) && !CUIsBanned(rcup)) {
-         localinvite(chanservnick, rcup->chan->index->channel, np);
+         localinvite(chanservnick, rcup->chan->index, np);
        }
       }
-    }
-  }
+    } /* if (rcup->chan->index->channel) */ else {
+      /* Channel doesn't currently exist - send invite anyway for +j */
+      if (CUIsAutoInvite(rcup) && CUKnown(rcup) && !CUIsBanned(rcup)) {
+        localinvite(chanservnick, rcup->chan->index, np);
+      }
+    } 
+  } /* for */
 }
 
 void cs_checknickbans(nick *np) {
index d625833942766e4d181507e1e1400f4ace75cbbe..c36af709104ba23bce6778598098b4c43e1dd634 100644 (file)
@@ -185,7 +185,7 @@ void helpmod_invite(hchannel *hchan, huser *husr)
     if (hchan->flags & H_PASSIVE)
         return;
 
-    localinvite(helpmodnick, hchan->real_channel, husr->real_user);
+    localinvite(helpmodnick, hchan->real_channel->index, husr->real_user);
 }
 
 static void hmode_set_channel(hchannel  *hchan)
index 0b37a9dadd1f280036f9f5f9bae4001d168c0248..447ae8853c9ee38c594021e3182e734c32242ba7 100644 (file)
@@ -10,6 +10,6 @@
 #define _BUILDID "" XStringify(BUILDID) ""
 #endif
 
-#define MODULE_VERSION(id) const char *_version(const char **version) { *version=(id[0]=='\0')?NULL:id; return _BUILDID; };
+#define MODULE_VERSION(id) const char *_version(const char **version) { *version=(id[0]=='\0')?NULL:id; return _BUILDID; }
 
 #endif
index 86f4ed11e2b388c1fca80f5bd2e30dd11169d988..67d0b1b629331d37790f7c073cd933a936481bed 100644 (file)
@@ -1066,7 +1066,7 @@ void sendopnoticetochannel(nick *source, channel *cp, char *format, ... ) {
   }
 }
 
-void localinvite(nick *source, channel *cp, nick *target) {
+void localinvite(nick *source, chanindex *cip, nick *target) {
 
   /* Servers can't send invites */
   if (!source) 
@@ -1078,7 +1078,7 @@ void localinvite(nick *source, channel *cp, nick *target) {
    * argument */
   if (connected) {
     irc_send("%s I %s :%s",longtonumeric(source->numeric,5),
-            target->nick, cp->index->name->content);
+            target->nick, cip->name->content);
   }
 }
   
index 5f450ee9975141d3c1a5081931478e7f365e9805..14d534373e1711a4981b35aeb553bf4d431084c7 100644 (file)
@@ -41,7 +41,7 @@ void localkickuser(nick *np, channel *cp, nick *target, const char *message);
 void localusermodechange(nick *np, channel *cp, char *modes);
 void sendmessagetochannel(nick *source, channel *cp, char *format, ... ) __attribute__ ((format (printf, 3, 4)));
 void sendopnoticetochannel(nick *source, channel *cp, char *format, ... ) __attribute__ ((format (printf, 3, 4)));
-void localinvite(nick *source, channel *cp, nick *target);
+void localinvite(nick *source, chanindex *cip, nick *target);
 
 void localsetmodeinit (modechanges *changes, channel *cp, nick *np);
 void localdosetmode_nick (modechanges *changes, nick *target, short modes);
index 84b6e960e14c33162338e6d3817108a8fca1ed8f..22b1b45756318ed301d40624748b1daf8b0b503b 100644 (file)
@@ -210,7 +210,7 @@ static int lua_invite(lua_State *ps) {
   if(!cp)
     LUA_RETURN(ps, LUA_FAIL);
 
-  localinvite(lua_nick, cp, np);
+  localinvite(lua_nick, cp->index, np);
 
   LUA_RETURN(ps, LUA_OK);
 }