Various chat system fixes. A bug in present day penn that yes..
authorRick L Bird <nveid@yahoo.com>
Fri, 6 May 2011 19:15:42 +0000 (15:15 -0400)
committerRick L Bird <nveid@yahoo.com>
Fri, 6 May 2011 19:15:42 +0000 (15:15 -0400)
We fixed again! If your not on a channel and you use the

@chat <chan>=message command

It now returns either that your not allowed to speak on the channel,
because your not on it.  Or if its open or you have chat powers over
the channel creator you can speak on it.

src/extchat.c

index ab0abfe798d417637257f4a6175c687ca93f1ea0..507d82a4e1bba50c500b040abac4c4dd32866998 100644 (file)
@@ -1503,10 +1503,15 @@ do_chat_by_name(dbref player, const char *name, const char *msg, int source)
     do_chat(player, c, msg);
     return 1;
   case CMATCH_NONE:
+    /* If this isn't from teh command just return 0 */
+    if(!source)
+      return 0;
     if (find_channel(name, &c, player) == CMATCH_NONE) {
       if (source)
         notify(player, T("CHAT: No such channel."));
       return 0;
+    } else { /* The channel exists!  See if we can send a message to it */
+      do_chat(player, c, msg);
     }
   }
   return 0;
@@ -1546,7 +1551,7 @@ do_chat(dbref player, CHAN *chan, const char *arg1)
   u = onchannel(player, chan);
   canhear = u ? !Chanuser_Gag(u) : 0;
   /* If the channel isn't open, you must hear it in order to speak */
-  if (!Channel_Open(chan)) {
+  if (!Channel_Open(chan) &&  !div_powover(player, ChanCreator(chan), "Chat")) {
     if (!u) {
       notify(player, T("You must be on that channel to speak on it."));
       return;