Code: Select all
# This is the "string" we use to Auth to are account
# Example:
#
# AuthServ login mybot mybotspassword
#
# Would send "login mybot mybotspassword" to AuthServ
set account_syntax ""
set oper_name "" ;# O:line name to use for /oper
set oper_pass "" ;# O:line password to use for /oper
proc vhost:pub {nick uhost hand chan text} {
set vhost [lindex [split $text] 0]
if {$vhost == ""} {
puthelp "NOTICE $nick :Usage: -vhost <Your.IRC.Vhost>"
return 0
} else {
putserv "PRIVMSG AuthServ OSET $nick fakehost $vhost"
putlog "VHOST: Set fakehost for $nick ($uhost) to $vhost"
return 1
}
}
proc operin:evnt {type} {
global account_syntax oper_name oper_pass
if {$account_syntax != ""} {
puthelp "PRIVMSG $account_syntax"
putlog "AUTH: logged in to my account with [lindex [split $account_syntax] 0]"
}
if {($oper_name != "") && ($oper_pass != "")} {
putserv "OPER $oper_name $oper_pass"
putlog "OPER: send /OPER command to IRC Server"
}
}
bind pub -|- -vhost vhost:pub
bind evnt - init-server operin:evnt