NEIGHBR: ellesd
Jan 20 2009
TCL/Eggdrop: Virtual Hostname Service
Source/README: http://townkill.org/projects/tcl/vhost.tcl

set opernick "eggdrop"
set operpass "eggdrop123"
set operchan "#opers"
set queuemsg "Your vhost has been qeued and awaiting approval. Thank you."
set admin1 "admin1"
set admin2 "admin2"
set file "ircd.vhosts"
set path "/path/to/ircd.vhosts"
## This will automatically oper up on connect if set as 1 
set operonconnect "1" 


## Do NOT edit below this line unless you know what you are doing.
proc evnt:init_server {type} {
	global operpass opernick operonconnect
	if {$operonconnect == "1"} { 
	putserv "OPER $opernick $operpass"
	return 1
		} else {
	return 0
 }
}

proc reqvhost {nick uhost hand arg} {
	global operchan admin1 admin2 w1 w2 w3 queuemsg
	set arg [split $arg]
	set w1 [lindex $arg 0]
	set w2 [lindex $arg 1]
	set w3 [lindex $arg 2]
	putserv "PRIVMSG $operchan : User: \00315 $nick \003 ( $uhost ) has requested login/pass/vhost: $w1 / $w2 / $w3 . Awaiting approval."
	putserv "PRIVMSG Memoserv : send $admin1 User: $nick ( $uhost ) has requested login/pass/vhost: $w1 / $w2 / $w3  . Awaiting approval."  
	utimer 10 "[putserv "PRIVMSG $operchan : Notifying admins..."]"
	putserv "PRIVMSG Memoserv : send $admin2 User: $nick ( $uhost ) has requested login/pass/vhost: $w1 / $w2 / $w3 . Awaiting approval."
	putserv "PRIVMSG $nick : $queuemsg"
	return 1
}

proc appvhost {nick uhost hand arg} {
	global operchan path file w1 w2 w3 admin1 admin2	
	if {$nick != $admin1} {
		putserv "NOTICE $nick : You do not have permission to use this command."
		return 0
	} elseif {$nick != $admin2} {
		putserv "NOTICE $nick : You do not have permission to use this command."
		return 0
	} else {
		putserv "NOTICE $operchan : User: \00315 $nick \003 ( $uhost ) has approved the vhost."
		set fs [open $path/ircd.vhosts a]
		set arg [split $arg]
		set w1 [lindex $arg 0] 
		set w2 [lindex $arg 1]
		set w3 [lindex $arg 2]  
		puts $fs "vhost { vhost $w3; from { userhost *@*; }; login $w1; password $w2; };"
		close $fs
		putserv "REHASH"	
		putserv "NOTICE $operchan : $arg added. Rehashed the server."
		putserv "PRIVMSG $w1 : Your vhost: $w1 / $w2 / $w3 has been accepted."
		return 1
	}

}

proc apphost {nick uhost handle channel arg} {
	global operchan path file w1 w2 w3
	if {$channel == $operchan} {
		putserv "NOTICE $operchan : User: \00315 $nick \003 ( $uhost ) has approved the vhost."
                set fs [open $path/ircd.vhosts a]
                set arg [split $arg]
                set w1 [lindex $arg 0]
                set w2 [lindex $arg 1]
                set w3 [lindex $arg 2]
                puts $fs "vhost { vhost $w3; from { userhost *@*; }; login $w1; password $w2; };"
                close $fs
                putserv "REHASH"
                putserv "NOTICE $operchan : $arg added. Rehashed the server."
                putserv "PRIVMSG $w1 : Your vhost: $w1 / $w2 / $w3 has been accepted."
                return 1
	} else {
		putserv "NOTICE $nick : You cannot use that command in this channel."
		return 0
	}
}

proc oup {nick uhost handle arg} {
	global opernick operpass admin1
	if {$nick != $admin1} {
	putserv "NOTICE $nick Sorry, you must be the admin to use this command."
	return 0
		} else {
	putserv "OPER $opernick $operpass"
	return 1
	}
}

bind pub - !approve apphost 
bind msg - !operup oup 
bind msg - !request reqvhost 
bind msg - !approve appvhost 

set ver "v1.3"
putlog "vhbot.tcl $ver © James Michigan 2003 loaded."

NEIGHBR:
Nov 10 2009
GBavGR upzhvgxxawyo, [url=http://dfyiadunjuus.com/]dfyiadunjuus[/url], [link=http://zrnbmtpcxnpw.com/]zrnbmtpcxnpw[/link], http://jicqtqigyarn.com/
GBavGR upzhvgxxawyo, [url=http://dfyiadunjuus.com/]dfyiadunjuus[/url], [link=http://zrnbmtpcxnpw.com/]zrnbmtpcxnpw[/link], http://jicqtqigyarn.com/

NEIGHBR:
Jan 12 2010
75yvQi zihwdodigzhi, [url=http://rvqflwcaqrrq.com/]rvqflwcaqrrq[/url], [link=http://hglsjggbguib.com/]hglsjggbguib[/link], http://iwkkmwibkper.com/
75yvQi zihwdodigzhi, [url=http://rvqflwcaqrrq.com/]rvqflwcaqrrq[/url], [link=http://hglsjggbguib.com/]hglsjggbguib[/link], http://iwkkmwibkper.com/

NEIGHBR:
Jan 14 2010
HPBimkQUTfvYY
orjbfI jvvqvataymrq, [url=http://qbttimjvnjtv.com/]qbttimjvnjtv[/url], [link=http://htlvsfdsbokn.com/]htlvsfdsbokn[/link], http://ipfvedzvapji.com/

REPLY
Neighbr