chiark / gitweb /
untell works for unregistered nicks
[ircbot] / bot.tcl
diff --git a/bot.tcl b/bot.tcl
index c473ce1cb66d1e287db26018003355dfa85835e4..06f0b7c61ff59b6ae340816c22e1be9bc4fe3045 100755 (executable)
--- a/bot.tcl
+++ b/bot.tcl
@@ -1328,7 +1328,7 @@ proc tell_delete_msgs {lsenders lrecip} {
 def_ucmd untell {
     prefix_nick
     check_notonchan
-    nick_securitycheck 0
+    if {[nickdb_exists $n]} { nick_securitycheck 0 }
     set recipients [tell_peernicks $text]
     if {![llength $recipients]} {
        usererror "You must say which recipients' messages from you to forget."
@@ -1349,7 +1349,7 @@ def_ucmd delmsg {
     manyset [nickdb_get_sec_effective $n] sec secwhen
     switch -exact $sec {
        insecure { }
-       refuse - mailto {
+       reject - mailto {
            usererror \
  "There are no messages to delete\
  because your message disposition prevents them from being left."
@@ -1398,9 +1398,9 @@ def_ucmd tellme {
     prefix_nick
     ta_nomore
     check_notonchan
-    manyset [msgsdb_get $n tellsec] sec
+    manyset [nickdb_get $n tellsec] sec
     switch -exact $sec {
-       refuse { ucmdr "But, you asked me to refuse messages for you !" {} }
+       reject { ucmdr "But, you asked me to reject messages for you !" {} }
        mailto { ucmdr "But, you asked me to mail your messages to you !" {} }
     }
     switch -exact [tell_event [irctolower $n] tellme] {
@@ -1484,7 +1484,7 @@ $n asked me[expr {[ischan $dest] ? " on $dest" : ""}] to tell you:
  "I've mailed $ctarget, which is what they prefer." \
                 {}
        }
-       refuse {
+       reject {
            usererror "Sorry, $ctarget does not want me to take messages."
        }
        default {
@@ -1611,7 +1611,7 @@ proc tellme_sec_desc {v n} {
  securely.  See `help register'.)"
            }
        }
-       refuse {
+       reject {
            return "I shan't accept messages for you."
        }
        mailto {
@@ -1720,7 +1720,7 @@ def_setting tellme {
            set mr [tellme_rel_desc [nickdb_get $n tellrel] $n]
            return "$ms  $mr"
        }
-       refuse - mailto {
+       reject - mailto {
            return $ms
        }
     }
@@ -1737,7 +1737,7 @@ def_setting tellme {
            set sr sec
            set v [list secure $every]
        }
-       refuse {
+       reject {
            tellme_setting_neednomsgs
            tellme_setting_sec_simple
        }
@@ -1756,10 +1756,11 @@ def_setting tellme {
        unreliable - pester - remind {
            manyset [nickdb_get $n tellsec] sec
            switch -exact $sec {
-               refuse - mailto {
+               reject - mailto {
                    usererror \
- "You can't change your message delivery conditions when\
- your message disposition prevents messages from being left."
+ "Sorry, I shan't change when I'll consider a message delivered, because\
+ you've asked me not to keep messages, or to mail them to you.\
+  You should say `set tellme secure' or some such, first."
                }
            }
            set sr rel