]> jfr.im git - irc/quakenet/newserv.git/blobdiff - helpmod2/hcommands.c
CHANSERV: remove E type escapes
[irc/quakenet/newserv.git] / helpmod2 / hcommands.c
index 06ebe4748f093202b07048a229d1da02c99b5d55..d7544074d2796cb84858458a4e6047d57a7c3d0c 100644 (file)
@@ -1082,7 +1082,7 @@ void helpmod_cmd_term (huser *sender, channel* returntype, char* ostr, int argc,
             char *name = argv[1], *description;
             SKIP_WORD; SKIP_WORD;
             description = ostr;
-            htrm = hterm_add(source, name, description);
+            hterm_add(source, name, description);
             helpmod_reply(sender, returntype, "Term %s added succesfully", name);
         }
     }
@@ -1889,7 +1889,6 @@ static void helpmod_cmd_stats (huser *sender, channel* returntype, char* ostr, i
 static void helpmod_cmd_chanstats (huser *sender, channel* returntype, char* ostr, int argc, char *argv[])
 {
     hchannel *hchan;
-    hstat_channel *channel_stats;
     hstat_channel_entry *stat_entry;
 
     time_t timer = time(NULL);
@@ -1953,8 +1952,6 @@ static void helpmod_cmd_chanstats (huser *sender, channel* returntype, char* ost
             }
         }
 
-    channel_stats = hchan->stats;
-
     if (!days && !weeks)
         return;
 
@@ -2685,7 +2682,6 @@ static void helpmod_cmd_checkchannel(huser *sender, channel* returntype, char* o
     /* third pass - find status boundaries */
     {
        for (;o_limit < nick_count && numeric_array[o_limit] & CUMODE_OP; o_limit++);
-        v_limit = o_limit;
        for(v_limit = o_limit; (v_limit < nick_count) && numeric_array[v_limit] & CUMODE_VOICE; v_limit++);
     }
 
@@ -3181,7 +3177,7 @@ static void helpmod_cmd_text (huser *sender, channel* returntype, char* ostr, in
        DIR *dir;
        struct dirent *dent;
        char buffer[384], **lines, *start;
-        int nwritten, bufpos = 0, nlines = 0,i;
+        int bufpos = 0, nlines = 0,i;
 
        dir = opendir(HELPMOD_TEXT_DIR);
        assert(dir != NULL);
@@ -3232,8 +3228,7 @@ static void helpmod_cmd_text (huser *sender, channel* returntype, char* ostr, in
                buffer[bufpos] = ' ';
                bufpos++;
            }
-           sprintf(buffer + bufpos, "%s%n", lines[i], &nwritten);
-           bufpos+=nwritten;
+           bufpos+=sprintf(buffer + bufpos, "%s", lines[i]);
 
            if (bufpos > (384 - (HED_FILENAME_LENGTH+1)))
            {
@@ -3306,6 +3301,7 @@ static void helpmod_cmd_text (huser *sender, channel* returntype, char* ostr, in
        if ((in = fopen(fname_buffer, "rt")) != NULL)
        {
            helpmod_reply(sender, returntype, "Can not add text: Text %s already exists", argv[1]);
+            fclose(in);
             return;
        }
        else