[project @ 2005-06-24 18:59:07 by unknown_lamer]
authorunknown_lamer <unknown>
Fri, 24 Jun 2005 18:59:07 +0000 (18:59 +0000)
committerunknown_lamer <unknown>
Fri, 24 Jun 2005 18:59:07 +0000 (18:59 +0000)
bot:msg and bot:say are the same thing now

ChangeLog
NEWS
source/Commands.C

index e3cfd5c..be61408 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-06-24  Clinton Ebadi  <clinton@unknownlamer.org>
 
+       * source/Commands.C (Msg): Move body of Say to an if inside of this
+       (Say): Just call Msg
+
        * source/ScriptCommands.C (sendNotice): Returns error code instead
        of just #t or #f
 
diff --git a/NEWS b/NEWS
index 0fa13c1..655161f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,8 @@ Version 2.1.8:
   + Misc
     * Added (bobotpp bot) module that modules may use to gain access
       to the bobot++ functions
+    * bot:msg and bot:say may both send to channels and users (instead
+      of bot:msg for users and bot:say for channels)
 - Documentation
   + Merged documentation patch from Dale Smith (thanks)
 
index 29a7680..55cdb44 100644 (file)
@@ -477,7 +477,10 @@ Commands::Msg(Bot *bot, String who, String message)
 
   if (Utils::channel_p(who))
     {
-      return Commands::Say (bot, who, message);
+      if (!CHANNEL(who))
+       {
+         return NotOnChannel (who);
+       }
     }
 
   if (message == "")
@@ -603,14 +606,7 @@ Commands::Reconnect(Bot *bot)
 Message
 Commands::Say(Bot *bot, String channel, String message)
 {
-  CHECK_CONNECTION;
-
-  if (!CHANNEL(channel))
-    return NotOnChannel(channel);
-
-  QUEUE->sendPrivmsg(channel, message);
-
-  return Ok;
+  return Commands::Msg (bot, channel, message);
 }