]> git.donarmstrong.com Git - infobot.git/commitdiff
- endofnames: chanserv ops should work now.
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 5 Feb 2001 15:30:06 +0000 (15:30 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Mon, 5 Feb 2001 15:30:06 +0000 (15:30 +0000)
- store topic irrevelent of setting.
- call ->whois() if nuh is not found.

git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@342 c11ca15a-4712-0410-83d8-924469b57eb5

src/IRC/IrcHooks.pl

index 382d745f781a5c58152984d5aeb12ac0cc7f4353..0b0887aee7a4ed65faa01866fe41ccb59d5ffef4 100644 (file)
@@ -46,7 +46,9 @@ sub on_chat {
     # who is set to bot's name, why?
 
     if (!exists $nuh{$who}) {
     # who is set to bot's name, why?
 
     if (!exists $nuh{$who}) {
-       &DEBUG("chat: nuh{$who} doesn't exist; hrm should retry.");
+       &DEBUG("chat: nuh{$who} (nick => $nick) doesn't exist; trying WHOIS .");
+       $self->whois($who);
+       $self->whois($nick);
        return;
     } else {
        $message        = $msg;
        return;
     } else {
        $message        = $msg;
@@ -346,17 +348,14 @@ sub on_endofnames {
 
     if (scalar @joinchan) {    # remaining channels to join.
        &joinNextChan();
 
     if (scalar @joinchan) {    # remaining channels to join.
        &joinNextChan();
-    } else {
-       ### chanserv support.
-       ### TODO: what if we rejoin a channel.. need to set a var that
-       ###       we've done the request-for-ops-on-join.
-       return unless (&IsChanConf("chanServ_ops") > 0);
-       return unless ($nickserv);
-
-       if (!exists $channels{$chan}{'o'}{$ident}) {
-           &status("ChanServ ==> Requesting ops for $chan.");
-           &rawout("PRIVMSG ChanServ :OP $chan $ident");
-       }
+    }
+
+    return unless (&IsChanConf("chanServ_ops") > 0);
+    return unless ($nickserv);
+
+    if (!exists $channels{$chan}{'o'}{$ident}) {
+       &status("ChanServ ==> Requesting ops for $chan.");
+       &rawout("PRIVMSG ChanServ :OP $chan $ident");
     }
 }
 
     }
 }
 
@@ -775,7 +774,7 @@ sub on_topic {
        #       this may be fixed at a later date with topic queueing.
        ###
 
        #       this may be fixed at a later date with topic queueing.
        ###
 
-       $topic{$chan}{'Current'} = $topic if (1 and &IsChanConf("topic") == 1);
+       $topic{$chan}{'Current'} = $topic if (1);
        $chanstats{$chan}{'Topic'}++;
 
        &status(">>> topic/$b_blue$chan$ob by $b_cyan$nick$ob -> $topic");
        $chanstats{$chan}{'Topic'}++;
 
        &status(">>> topic/$b_blue$chan$ob by $b_cyan$nick$ob -> $topic");