]> jfr.im git - irc/quakenet/newserv.git/blobdiff - helpmod2/hcensor.c
GLINES: fix null pointer deref in trustgline / trustungline
[irc/quakenet/newserv.git] / helpmod2 / hcensor.c
index 7e379161d64dce801b963ddae0805754cc9bedd1..535b3907ea62114b913c94561c0c1bee1e2aaf41 100644 (file)
@@ -95,14 +95,14 @@ int hcensor_match(hchannel *hchan, huser *husr, hcensor *hcens)
     {
     case HCENSOR_WARN:
         if (hcens->reason)
-           helpmod_reply(husr, NULL, hcens->reason->content);
+           helpmod_reply(husr, NULL, "%s", hcens->reason->content);
        return 0;
     case HCENSOR_KICK:
-       helpmod_kick(hchan, husr, hcens->reason?hcens->reason->content:"Improper user");
+       helpmod_kick(hchan, husr, "%s", hcens->reason?hcens->reason->content:"Improper user");
        return !0;
     case HCENSOR_CHANBAN:
        helpmod_setban(hchan, hban_ban_string(husr->real_user, HBAN_HOST), HCMD_OUT_DEFAULT + time(NULL), MCB_ADD, HNOW);
-       helpmod_kick(hchan, husr, hcens->reason?hcens->reason->content:"Censor violation");
+       helpmod_kick(hchan, husr, "%s", hcens->reason?hcens->reason->content:"Censor violation");
        return !0;
     case HCENSOR_BAN:
        hban_add(hban_ban_string(husr->real_user, HBAN_HOST), hcens->reason?hcens->reason->content:"Censor violation", HCMD_OUT_DEFAULT + time(NULL), 1);