This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Oper + Set Fakehost script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
E
Ezzi
Voice
Posts: 3
Joined: Fri Dec 19, 2008 6:02 pm

Oper + Set Fakehost script

Post by Ezzi »

i use authserv on my network and i want my bot to be able to oper up and auth into an account but when someone says -vhost this.is.my.vhost.net i want the bot to /msg authserv oset USERS-NAME fakehost THIS.IS.MY.VHOST.NET
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Any problems, reply to this post :D

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
P.S this post is probably old by now, but since alot of requests for "oper" type scripts are around. felt it may at least help one of them :wink:
Post Reply