chiark / gitweb /
Set calling_nick to new nick on nick changes.
[ircbot] / bot.tcl
diff --git a/bot.tcl b/bot.tcl
index fc98c2ee35e78e94f274a4353e5147159e1767d9..1119fbfc02494e759bf434ed039dec435a0584bc 100755 (executable)
--- a/bot.tcl
+++ b/bot.tcl
@@ -376,9 +376,10 @@ proc nick_case {user} {
 }
 
 proc msg_NICK {p c newnick} {
-    global nick_arys nick_case
+    global nick_arys nick_case calling_nick
     prefix_nick
     recordlastseen_n $n "changing nicks to $newnick" 0
+    set calling_nick $newnick
     recordlastseen_n $newnick "changing nicks from $n" 1
     set luser [irctolower $n]
     lnick_marktime_cancel $luser
@@ -1026,6 +1027,9 @@ def_ucmd register {
                ucmdr {} "This is fine, but bear in mind that people will be able to mess with your settings.  Channel management features need a secure registration." "makes an insecure registration for your nick."
            }
        }
+       default {
+           error "you mean register / register delete / register insecure"
+       }
     }
 }