Просмотр исходного кода

* Port [3102] to 1.2.12
* Fix cmd_chinfo to use the standard 'whois restrictions' (fixes #303)
* Fix compile error in cmds.c


svn: 3103

Bryan Drewery 17 лет назад
Родитель
Сommit
6b9e9c864d
3 измененных файлов с 5 добавлено и 3 удалено
  1. 1 0
      doc/UPDATES
  2. 2 2
      src/cmds.c
  3. 2 1
      src/mod/channels.mod/cmdschan.c

+ 1 - 0
doc/UPDATES

@@ -15,6 +15,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * cmd_swhois is now -|- and hides all restricted information, channels; see 'help swhois'.
 * cmd_mop no longer defaults to console channel if no channel is specified. (fixes #302)
 * Fix cmds: bot[jump|server|version|msg] not running locally correctly. (fixes #304)
+* Fix cmd_chinfo to use the standard 'whois restrictions' (fixes #303)
 
 1.2.11 - http://wraith.shatow.net/milestone/1.2.11
 * Fixed typo in help for .set/.conf/.channel

+ 2 - 2
src/cmds.c

@@ -843,7 +843,7 @@ static void cmd_channels(int idx, char *par) {
     if (user && whois_access(dcc[idx].user, user)) {
       show_channels(idx, par);
     } else  {
-      dprintf(idx, "There is no user by that name.\n");
+      dprintf(idx, "No such user.\n");
     }
   } else {
       show_channels(idx, NULL);
@@ -3592,7 +3592,7 @@ static void cmd_botserver(int idx, char * par) {
     dprintf(idx, "Usage: botserver <bot>\n");
     return;
   }
-  if (egg_strcasecmp(conf.bot.nick, par) && nextbot(par)<0) {
+  if (egg_strcasecmp(conf.bot->nick, par) && nextbot(par)<0) {
     dprintf(idx, "%s isn't a linked bot.\n", par);
     return;
   }

+ 2 - 1
src/mod/channels.mod/cmdschan.c

@@ -420,6 +420,7 @@ static void cmd_info(int idx, char *par)
 
 static void cmd_chinfo(int idx, char *par)
 {
+
   if (!use_info) {
     dprintf(idx, "Info storage is turned off.\n");
     return;
@@ -434,7 +435,7 @@ static void cmd_chinfo(int idx, char *par)
 
   struct userrec *u1 = get_user_by_handle(userlist, handle);
 
-  if (!u1) {
+  if (!u1 || (u1 && !whois_access(dcc[idx].user, u1))) {
     dprintf(idx, "No such user.\n");
     return;
   }