egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Oper + Set Fakehost script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Ezzi
Voice


Joined: 19 Dec 2008
Posts: 3

PostPosted: Fri Dec 19, 2008 6:06 pm    Post subject: Oper + Set Fakehost script Reply with quote

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
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Tue Feb 24, 2009 1:40 pm    Post subject: Reply with quote

Any problems, reply to this post Very Happy

Code:
# 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
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber