Add 'tell' command; update copyright message.
authorMichael Poole <mdpoole@troilus.org>
Sat, 21 Oct 2006 16:04:19 +0000 (16:04 +0000)
committerMichael Poole <mdpoole@troilus.org>
Sat, 21 Oct 2006 16:04:19 +0000 (16:04 +0000)
src/modcmd.c (cmd_version): Update copyright years.  Move the multi-line
    credits to a separate message and make it actually send properly.
  (cmd_tell): New command.
  (modcmd_init): Register cmd_tell.
git-archimport-id: srvx@srvx.net--2006/srvx--devo--1.3--patch-59

ChangeLog
src/modcmd.c

index 8f8191b992097924c75b8bb036ee66c8e0d648ba..5110c3c93fc2cc18891f007dc736c96cbac5b5db 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,22 @@
 # arch-tag: automatic-ChangeLog--srvx@srvx.net--2006/srvx--devo--1.3
 #
 
+2006-10-21 16:04:19 GMT        Michael Poole <mdpoole@troilus.org>     patch-59
+
+    Summary:
+      Add 'tell' command; update copyright message.
+    Revision:
+      srvx--devo--1.3--patch-59
+
+    src/modcmd.c (cmd_version): Update copyright years.  Move the multi-line
+        credits to a separate message and make it actually send properly.
+      (cmd_tell): New command.
+      (modcmd_init): Register cmd_tell.
+
+    modified files:
+     ChangeLog src/modcmd.c
+
+
 2006-10-07 00:03:52 GMT        Michael Poole <mdpoole@troilus.org>     patch-58
 
     Summary:
index fb811e89385acd9020171978623ce2d63847344a..f1720f2e1b7ae76b16fca6d68be9542bae4cf3ca 100644 (file)
@@ -1853,12 +1853,27 @@ static MODCMD_FUNC(cmd_version) {
      * command or its accessibility to normal IRC users, except to add
      * copyright information pertaining to changes you make to srvx.
      */
-    send_message_type(4, user, cmd->parent->bot, "$b"PACKAGE_STRING"$b ("CODENAME"), Built: "__DATE__", "__TIME__".\nCopyright 2000-2004 srvx Development Team.\nThe srvx Development Team includes Paul Chang, Adrian Dewhurst, Miles Peterson, Michael Poole and others.\nThe srvx Development Team can be reached at http://sf.net/projects/srvx/ or in #srvx on irc.gamesurge.net.");
+    send_message_type(4, user, cmd->parent->bot, "$b"PACKAGE_STRING"$b ("CODENAME"), Built: "__DATE__", "__TIME__".  Copyright 2000-2006 srvx Development Team.");
     if ((argc > 1) && !irccasecmp(argv[1], "arch"))
         send_message_type(4, user, cmd->parent->bot, "%s", ARCH_VERSION);
+    else
+        send_message_type(12, user, cmd->parent->bot, "The srvx Development Team includes Paul Chang, Adrian Dewhurst, Miles Peterson, Michael Poole and others.\nThe srvx Development Team can be reached at http://sf.net/projects/srvx/ or in #srvx on irc.gamesurge.net.");
     return 1;
 }
 
+static MODCMD_FUNC(cmd_tell) {
+    struct userNode *target;
+    char *msg;
+
+    target = GetUserH(argv[1]);
+    msg = unsplit_string(argv + 2, argc - 2, NULL);
+    if (!target) {
+        reply("MSG_NOT_TARGET_NAME");
+        return 0;
+    }
+    send_message_type(MSG_TYPE_NOXLATE, target, cmd->parent->bot, "%s", msg);
+    return 1;
+}
 
 void
 modcmd_nick_change(struct userNode *user, const char *old_nick) {
@@ -2101,6 +2116,7 @@ modcmd_init(void) {
     modcmd_register(modcmd_module, "service privileged", cmd_service_privileged, 2, 0, "flags", "+oper", NULL);
     modcmd_register(modcmd_module, "service remove", cmd_service_remove, 2, 0, "flags", "+oper", NULL);
     modcmd_register(modcmd_module, "dumpmessages", cmd_dump_messages, 1, 0, "oper_level", "1000", NULL);
+    modcmd_register(modcmd_module, "tell", cmd_tell, 3, 0, "flags", "+oper", NULL);
     version_command = modcmd_register(modcmd_module, "version", cmd_version, 1, 0, NULL);
     message_register_table(msgtab);
 }