proc add_1 { nick uhost hand args } {
global chan_1 chan_3 db
set args [split $args " "]
set user [lindex $args 0]
set user [string range $user 1 end]
set pass [lindex $args 1]
set pass [string range $pass 0 end-1]
if { $user == "" || $pass == "" } {
putserv "NOTICE $nick :Please instert a Nickname and a password"
return 0
}
set up $user|$pass
set wfile [open $db a+]
puts $wfile $up
close $wfile
putserv "PRIVMSG $chan_3 :\[\00314DB UPDATE\003\] $user is added to Database by $nick"
}
I need it to only be able to work in #nemesis-staff
Thank you for anyone who can help me out with this.
bind pub n|n "!pub" add_1
proc add_1 {nick uhost hand chan arg} {
global chan_1 chan_3 db
if {$chan != "#nemesis-staff"} {return 0}
set arg [split $arg]
set user [lindex $args 0]
set pass [lindex $args 1]
if {$user = "" || $pass == ""} {
puthelp "NOTICE $nick :Please insert a Nickname and a password"
return 0
}
set up $user|$pass
set wfile [open $db a+]
puts $wfile $up
close $wfile
puthelp "PRIVMSG $chan_3 :\[\00314DB UPDATE\003\] $user is added to Database by $nick"
}
Last edited by krimson on Thu Sep 14, 2006 5:42 am, edited 1 time in total.
bind pub n|n "!pub" add_1
proc add_1 {nick uhost hand chan arg} {
global chan_1 chan_3 db
if {$chan != "#nemesis-staff"} {return 0}
set arg [split $arg]
set user [lindex $arg 0]
set pass [lindex $arg 1]
if {$user = "" || $pass == ""} {
puthelp "NOTICE $nick :Please insert a Nickname and a password"
return 0
}
set up $user|$pass
set wfile [open $db a+]
puts $wfile $up
close $wfile
puthelp "PRIVMSG $chan_3 :\[\00314DB UPDATE\003\] $user is added to Database by $nick"
}