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

* private() didn't check for (chan)!

svn: 1015
Bryan Drewery 22 лет назад
Родитель
Сommit
55e3fd256a
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      doc/UPDATES
  2. 1 1
      src/flags.c

+ 1 - 0
doc/UPDATES

@@ -11,6 +11,7 @@ This is a summary of ChangeLog basically.
 7.Don't auto-op users in a +take chan.
 8.+take now does +oooo on remaining bots instead of individual +o lines.
 9.Bots now record: USERNAME, NODENAME (shell host), OS in .whois.
+10.+private checking was segfaulting some cmds under certain conditions.
 
 1.1.7
 

+ 1 - 1
src/flags.c

@@ -384,7 +384,7 @@ void get_user_flagrec(struct userrec *u, struct flag_record *fr, const char *chn
  */
 int private(struct flag_record fr, struct chanset_t *chan, int type)
 {
-  if (!channel_private(chan) || glob_bot(fr) || glob_owner(fr))
+  if (!chan || !channel_private(chan) || glob_bot(fr) || glob_owner(fr))
     return 0; /* user is implicitly not restricted by +private, they may however be lacking other flags */
 
   if (type == PRIV_OP) {