Prechádzať zdrojové kódy

* Removed all //commenting

svn: 977
Bryan Drewery 22 rokov pred
rodič
commit
8b2d05b0d9

+ 14 - 14
src/cmds.c

@@ -1735,8 +1735,6 @@ static void cmd_chaddr(struct userrec *u, int idx, char *par)
       bi->address = calloc(1, r - addr + 1);	/* alloc and copy the addr */
       strncpyz(bi->address, addr, r - addr + 1);
 
-//      addr = r;					/* move up addr to the ']' */
-//      addr++;					/* move up addr tot he ':' */
       q = r + 1;				/* set q to ':' at addr */
     } else {
 #endif /* !USE_IPV6 */
@@ -1887,9 +1885,10 @@ static void cmd_conf(struct userrec *u, int idx, char *par)
       if (par[0] && what) { /* set */
         set++;
         save = 1;
-//        if (!egg_strcasecmp(what, "uid"))            conffile.uid = atoi(par);
-//        else if (!egg_strcasecmp(what, "uname"))     str_redup(&conffile.uname, par);
-//        else if (!egg_strcasecmp(what, "username"))  str_redup(&conffile.username, par);
+/*        if (!egg_strcasecmp(what, "uid"))            conffile.uid = atoi(par);
+        else if (!egg_strcasecmp(what, "uname"))     str_redup(&conffile.uname, par);
+        else if (!egg_strcasecmp(what, "username"))  str_redup(&conffile.username, par);
+*/
         if (!egg_strcasecmp(what, "homedir"))   str_redup(&conffile.homedir, par);
         else if (!egg_strcasecmp(what, "binpath"))   str_redup(&conffile.binpath, par);
         else if (!egg_strcasecmp(what, "binname"))   str_redup(&conffile.binname, par);
@@ -1908,9 +1907,10 @@ static void cmd_conf(struct userrec *u, int idx, char *par)
     if (show) {
       char *ss = set ? "Set: " : "";
       
-//      if (!what || !egg_strcasecmp(what, "uid"))        dprintf(idx, "%suid: %d\n", ss, conffile.uid);
-//      if (!what || !egg_strcasecmp(what, "uname"))      dprintf(idx, "%suname: %s\n", ss, conffile.uname);
-//      if (!what || !egg_strcasecmp(what, "username"))   dprintf(idx, "%susername: %s\n", ss, conffile.username);
+/*      if (!what || !egg_strcasecmp(what, "uid"))        dprintf(idx, "%suid: %d\n", ss, conffile.uid);
+      if (!what || !egg_strcasecmp(what, "uname"))      dprintf(idx, "%suname: %s\n", ss, conffile.uname);
+      if (!what || !egg_strcasecmp(what, "username"))   dprintf(idx, "%susername: %s\n", ss, conffile.username);
+*/
       if (!what || !egg_strcasecmp(what, "homedir"))    dprintf(idx, "%shomedir: %s\n", ss, conffile.homedir);
       if (!what || !egg_strcasecmp(what, "binpath"))    dprintf(idx, "%sbinpath: %s\n", ss, conffile.binpath);
       if (!what || !egg_strcasecmp(what, "binname"))    dprintf(idx, "%sbinname: %s\n", ss, conffile.binname);
@@ -1989,8 +1989,8 @@ static void cmd_restart(struct userrec *u, int idx, char *par)
 
   fatal("Restarting...", 1);
   usleep(2000 * 500);
-  unlink(conf.bot->pid_file); //if this fails it is ok, cron will restart the bot, *hopefully*
-  system(binname); //start new bot.
+  unlink(conf.bot->pid_file); /* if this fails it is ok, cron will restart the bot, *hopefully* */
+  system(binname); /* start new bot. */
   exit(0);
 }
 
@@ -2271,7 +2271,7 @@ int check_dcc_attrs(struct userrec *u, flag_t oatr)
 	dprintf(i, "You are no longer an owner of this bot.\n");
       }
 
-      if (!(u->flags & USER_PARTY) && dcc[i].u.chat->channel >= 0) { //who cares about old flags, they shouldnt be here anyway.
+      if (!(u->flags & USER_PARTY) && dcc[i].u.chat->channel >= 0) { /* who cares about old flags, they shouldnt be here anyway. */
         dprintf(i, "-+- POOF! -+-\n");
         dprintf(i, "You no longer have party line chat access.\n");
         dprintf(i, "Leaving chat mode...\n");
@@ -3973,9 +3973,9 @@ void rcmd_jump(char * frombot, char * fromhand, char * fromidx, char * par) {
     port = atoi(newsplit(&par));
     if (!port)
       port = default_port;
-    strncpyz(newserver, other, 120); //newserver
-    newserverport = port; //newserverport
-    strncpyz(newserverpass, par, 120); //newserverpass
+    strncpyz(newserver, other, 120); 
+    newserverport = port; 
+    strncpyz(newserverpass, par, 120); 
   }
   botnet_send_cmdreply(conf.bot->nick, frombot, fromhand, fromidx, "Jumping...");
 

+ 8 - 8
src/crypto/sha.c

@@ -77,12 +77,12 @@ void sha1_block_host_order (SHA_CTX *c, const void *d, int num)
         {
         const SHA_LONG *W=d;
         register unsigned long A,B,C,D,E,T;
-//#ifndef MD32_XARRAY
+/* #ifndef MD32_XARRAY */
         unsigned long     XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
                                 XX8, XX9,XX10,XX11,XX12,XX13,XX14,XX15;
-//#else
-//        SHA_LONG        XX[16];
-//#endif
+/*#else
+        SHA_LONG        XX[16];
+#endif*/
 
         A=c->h0;
         B=c->h1;
@@ -202,12 +202,12 @@ void sha1_block_data_order (SHA_CTX *c, const void *p, int num)
         {
         const unsigned char *data=p;
         register unsigned long A,B,C,D,E,T,l;
-//#ifndef MD32_XARRAY
+/* #ifndef MD32_XARRAY */
         unsigned long     XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
                                 XX8, XX9,XX10,XX11,XX12,XX13,XX14,XX15;
-//#else
-//        SHA_LONG        XX[16];
-//#endif
+/*#else
+        SHA_LONG        XX[16];
+#endif*/
 
         A=c->h0;
         B=c->h1;

+ 2 - 2
src/dcc.c

@@ -1087,9 +1087,9 @@ static void dcc_chat(int idx, char *buf, int i)
 	}
 	v++;
 	break;
-      case 27:			// ESC - ansi code?
+      case 27:			/* ESC - ansi code? */
 	doron = check_ansi(v);
-	// If it's valid, append a return-to-normal code at the end
+	/* If it's valid, append a return-to-normal code at the end */
 	if (!doron) {
 	  *d++ = *v++;
 	  fixed = 1;

+ 1 - 1
src/mod/channels.mod/cmdschan.c

@@ -904,7 +904,7 @@ static void cmd_cycle(struct userrec *u, int idx, char *par)
   if (par[0])
     delay = atoi(newsplit(&par));
 
-  sprintf(buf2, "cycle %s %d", chname, delay); //this just makes the bot PART
+  sprintf(buf2, "cycle %s %d", chname, delay); /* this just makes the bot PART */
   putallbots(buf2);
 #ifdef LEAF
   do_chanset(NULL, chan, "+inactive", DO_LOCAL);

+ 3 - 3
src/mod/irc.mod/chan.c

@@ -155,9 +155,9 @@ void priority_do(struct chanset_t * chan, int opsonly, int action)
         if (m->user)
           get_user_flagrec(m->user, &fr, chan->dname);
 
-        if (((glob_deop(fr) && !chan_op(fr)) || chan_deop(fr)) || //+d ?
-           ((!channel_private(chan) && !chan_op(fr) && !glob_op(fr)) || //simply no +o flag.
-           (channel_private(chan) && !glob_bot(fr) && !glob_owner(fr) && !chan_op(fr)))) { //private?
+        if (((glob_deop(fr) && !chan_op(fr)) || chan_deop(fr)) || /* +d */
+           ((!channel_private(chan) && !chan_op(fr) && !glob_op(fr)) || /* simply no +o flag. */
+           (channel_private(chan) && !glob_bot(fr) && !glob_owner(fr) && !chan_op(fr)))) { /* private? */
           targets++;
         }
     }

+ 5 - 5
src/mod/irc.mod/irc.c

@@ -1114,15 +1114,15 @@ void raise_limit(struct chanset_t * chan) {
     return;
   }
 
-  mem = chan->channel.members; //members
-  nl = mem + chan->limitraise; //new limit
-  cl = chan->channel.maxmembers; //current limit
+  mem = chan->channel.members; /* members */
+  nl = mem + chan->limitraise; /* new limit */
+  cl = chan->channel.maxmembers; /* current limit */
 
   i = chan->limitraise / 4;
 
   /* if the newlimit will be in the range made by these vars, dont change. */
-  ul = nl + i; //upper limit range
-  ll = nl - i; //lower limit range
+  ul = nl + i; /* upper limit range */
+  ll = nl - i; /* lower limit range */
   if (cl > ll && cl < ul) {
     return; 			/* the current limit is in the range, so leave it. */
   }

+ 4 - 3
src/mod/irc.mod/mode.c

@@ -419,14 +419,15 @@ static void got_op(struct chanset_t *chan, char *nick, char *from,
     /* deop if they are +d or it is +bitch */
     if ( chk_deop(victim, chan) ||
         (!loading && userlist && channel_bitch(chan) && !chk_op(victim, chan)) ) {	/* chk_op covers +private */
-//      char outbuf[101] = "";
+/*      char outbuf[101] = ""; */
 
       /* if (target_priority(chan, m, 1)) */
 /*        dprintf(DP_MODE, "MODE %s -o %s\n", chan->name, who); */
 add_mode(chan, '-', 'o', who);
 flush_mode(chan, QUICK);
-//      sprintf(outbuf, "MODE %s -o %s\n", chan->name, who);
-//      tputs(serv, outbuf, strlen(outbuf));
+/*      sprintf(outbuf, "MODE %s -o %s\n", chan->name, who);
+      tputs(serv, outbuf, strlen(outbuf));
+*/
     } else if (reversing) {
       add_mode(chan, '-', 'o', who);
     }

+ 2 - 2
src/mod/irc.mod/msgcmds.c

@@ -306,7 +306,7 @@ static int msg_pls_auth(char *nick, char *host, struct userrec *u, char *par)
   if (auth[i].authing != 2)
     return BIND_RET_BREAK;
 
-  if (!strcmp(auth[i].hash, par)) { //good hash!
+  if (!strcmp(auth[i].hash, par)) { /* good hash! */
 #endif /* S_AUTHHASH */
     putlog(LOG_CMDS, "*", "(%s!%s) !%s! +AUTH", nick, host, u->handle);
     auth[i].authed = 1;
@@ -314,7 +314,7 @@ static int msg_pls_auth(char *nick, char *host, struct userrec *u, char *par)
     auth[i].authtime = now;
     auth[i].atime = now;
     dprintf(DP_HELP, "NOTICE %s :You are now authorized for cmds, see %shelp\n", nick, cmdprefix);
-  } else { //bad hash!
+  } else { /* bad hash! */
     putlog(LOG_CMDS, "*", "(%s!%s) !%s! failed +AUTH", nick, host, u->handle);
 #ifdef S_AUTHHASH
 {

+ 1 - 1
src/mod/update.mod/update.c

@@ -207,7 +207,7 @@ static void got_nu(char *botnick, char *code, char *par)
 }
 
 static cmd_t update_bot[] = {
-  {"nu?",    "", (Function) got_nu, NULL}, //need update?
+  {"nu?",    "", (Function) got_nu, NULL}, 
   {NULL, NULL, NULL, NULL}
 };
 

+ 1 - 1
src/net.c

@@ -1440,7 +1440,7 @@ int sockgets(char *s, int *len)
     strcpy(s, xx);
 /*    strcpy(xx, p + 1); */
     sprintf(xx, "%s", p + 1);
-//    if (s[0] && strlen(s) && (s[strlen(s) - 1] == '\r'))
+/*    if (s[0] && strlen(s) && (s[strlen(s) - 1] == '\r')) */
     if (s[strlen(s) - 1] == '\r')
       s[strlen(s) - 1] = 0;
     data = 1;			/* DCC_CHAT may now need to process a blank line */

+ 1 - 1
src/shell.c

@@ -307,7 +307,7 @@ void check_trace()
       if (i == (-1) && errno == EPERM)
         detected(DETECT_TRACE, "I'm being traced!");
       else {
-        //waitpid(parent, &i, 0);
+        /* waitpid(parent, &i, 0); */
         kill(parent, SIGCHLD);
         ptrace(PTRACE_DETACH, parent, 0, 0);
         kill(parent, SIGCHLD);