set birthday(file) "birth.txt"
if {[file exists $birthday(file)]} {
set birthday(data) [split [read [set inf [open $birthday(file) r]]] \n][close $inf]
unset inf
} else {
set birthday(data) [list]
}
bind pub - !birth pub:birthdays
proc pub:birthdays {nick uhost hand chan text} {
global birthday
set day [lindex [split $text] 0]
set line [list]
foreach i [lsearch -regexp $birthday(data) "$day *"] {
lappend line [join [lrange [split [lindex $birthday(data) $i]] 1 end]]
}
set line [join $line]
putserv "PRIVMSG $chan :$day $line"
}
I got this script, I think you know what it does.
How to make that when I enter !birth bot notice how to use it.
ex.
(@me) !birth
Notice -- (bot) -- Usage: !birth month.day