]> jfr.im git - irc/quakenet/newserv.git/blobdiff - chanserv/chancmds/op.c
fix bug in G stats
[irc/quakenet/newserv.git] / chanserv / chancmds / op.c
index 0bf6d45e73bb4e0f9718a3c5a1b4d2c65c2d913d..b4a9cc37e7f61c0d63f33c95bc7744947d6a4f7b 100644 (file)
@@ -81,6 +81,12 @@ int csc_doop(void *source, int cargc, char **cargv) {
     return CMD_ERROR;
 
   rcp=cip->exts[chanservext];
     return CMD_ERROR;
 
   rcp=cip->exts[chanservext];
+  
+  /* If the channel doesn't currently exist, forget it. */
+  if (!cip->channel) { 
+    chanservstdmessage(sender, QM_EMPTYCHAN, cip->name->content);  
+    return CMD_ERROR;
+  }
 
   if (cargc==1) {
     /* Only one arg: "op me" */
 
   if (cargc==1) {
     /* Only one arg: "op me" */
@@ -137,7 +143,7 @@ int csc_doop(void *source, int cargc, char **cargv) {
   }
 
   if (donotice && bufpos) {
   }
 
   if (donotice && bufpos) {
-    sendopnoticetochannel(chanservnick, cip->channel, "%s opped %s", sender, buf);
+    sendopnoticetochannel(chanservnick, cip->channel, "%s opped %s", sender->nick, buf);
   }
       
   localsetmodeflush(&changes, 1);
   }
       
   localsetmodeflush(&changes, 1);