]> jfr.im git - irc/evilnet/x3.git/blobdiff - src/chanserv.c
Added oset to help.
[irc/evilnet/x3.git] / src / chanserv.c
index 1102063e884056308d5e673f4b11842b881da89f..084e20b411eff138df2d0e0153a2447f9c7c0d87 100644 (file)
@@ -5732,6 +5732,20 @@ static CHANSERV_FUNC(cmd_huggle)
     return 1;
 }
 
+static CHANSERV_FUNC(cmd_calc)
+{
+    char response[MAXLEN];
+
+    REQUIRE_PARAMS(2);
+    do_math(response, unsplit_string(argv + 1, argc - 1, NULL));
+
+    if(channel)
+        send_channel_message(channel, cmd->parent->bot, "$b%s$b: %s", user->nick, response);
+    else
+        send_message_type(4, user, cmd->parent->bot, "%s", response);
+    return 1;
+}
+
 static void
 chanserv_adjust_limit(void *data)
 {
@@ -7203,6 +7217,7 @@ init_chanserv(const char *nick)
     DEFINE_COMMAND(8ball, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
     DEFINE_COMMAND(d, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
     DEFINE_COMMAND(huggle, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
+    DEFINE_COMMAND(calc, 1, 0, "flags", "+nolog,+toy,+acceptchan", NULL);
 
     /* Channel options */
     DEFINE_CHANNEL_OPTION(defaulttopic);