From e5d2b592074699b345ad9e7a67fefa05c621181a Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sat, 4 Feb 2006 16:52:53 +0000 Subject: [PATCH] Set topic now checks for owner --- mbtask/taskchat.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mbtask/taskchat.c b/mbtask/taskchat.c index ce24e68e..7831aa38 100644 --- a/mbtask/taskchat.c +++ b/mbtask/taskchat.c @@ -182,7 +182,8 @@ void chat_help(pid_t pid, int owner) system_msg(pid, (char *)" /NICK - Set new nickname"); system_msg(pid, (char *)" /PART - Leave current channel"); system_msg(pid, (char *)" /QUIT - Exit from chatserver"); - system_msg(pid, (char *)" /TOPIC - Set topic for current channel"); + if (owner) + system_msg(pid, (char *)" /TOPIC - Set topic for current channel"); system_msg(pid, (char *)""); system_msg(pid, (char *)" All other input (without a starting /) is sent to the channel."); } @@ -684,7 +685,7 @@ void chat_put_r(char *data, char *buf) snprintf(mbuf, 200, "** Internal system error"); for (tmpc = channels; tmpc; tmpc = tmpc->next) { if (strcmp(tmpu->channel, tmpc->name) == 0) { - if ((strcmp(tmpu->name, tmpc->owner) == 0) || (strcmp(tmpu->nick, tmpc->owner) == 0)) { + if (owner) { cmd = strtok(msg, " \0"); cmd = strtok(NULL, "\0"); if ((cmd == NULL) || (strlen(cmd) == 0) || (strlen(cmd) > 54)) {