If you had a better idea that's wellcome
Code: Select all
bind nick - * check_user_nick
proc check_user_nick {nick uhost hand chan newnick} {
if {[validuser $hand]} {
utimer 120 [ask_user $hand $newnick]
}
}
proc ask_user {hand newnick} {
set nick [hand2nick $hand]
if {![string match "" $nick] && [string match $newnick $nick]} {
if {![validuser "$nick!*@*"]} {
puthelp "NOTICE $nick :Do you want to add this host to my db?"
puthelp "NOTICE $nick :Try \002/msg LammestBot addthishost\002 to add this host"
}
}
}
bind msg - addthishost add_host
proc add_host {nick uhost hand args} {
set line ""
setuser $hand HOSTS "$nick!*@*"
foreach host [getuser $hand HOSTS] {
append line "$host "
}
if {$line != ""} {
puthelp "PRIVMSG $nick :You hosts are:"
puthelp "PRIVMSG $nick :$line"
}
}