Vhosts -Eggdrop

By Yoinx on Apr 15, 2005

This is useful on unrealircd networks with anope services. The bot needs an oline that would give it access to chghost, and access to set hosts in hostserv. There is one line that needs to be changed when you add words to the badwords list, it is commented as such. Sorry for any problems you may have with this (it works for what it is.) Also, this code will send a globops message when it changes a host, so that abuse can be monitored. Just change the variables at the top.

set channel "#vhost"
set operid "operlogin"
set operpass "youroperpass"

bind evnt - init-server oper
bind pub -|- !vhost vhost
bind join -|- * joinnotice

proc oper init-server { putserv "OPER $::operid $::operpass" }
proc joinnotice {noticenick noticehost noticehandle noticechan } {
 if { $noticechan == $::channel } {
   putserv "NOTICE $noticenick To change your host type !vhost <thehost.you.want> and you'll recieve a msg "
proc vhost {vhostnick vhosthost vhosthand vhostchan vhosttext} {
 if { $vhostchan == $::channel } {
   checkvhost $vhostnick $vhosttext
set badwords { *<censored>* *g0v* *admin* *fuck* *fag* *dick* *suck* *shit* *asshole* *zub* *bitch* *cock* *cunt* *whore* *slut* *fartknocker* *ass* *bastard* *nigger* *pussy* *dickhead* *nigga* *piss* *maricon* *shithead* *prick* *sucks* *dicks* *pricks* *.htm* *www.* *#* *channel* *sex* *ass* *trick* *fuk* *azz* *hail* *hitler* *gov* *mil* *cyberarmy* *cia* *fbi* *nsa* *dod* }
proc checkvhost { checknick vhostcheck } {
 if {[string match "*.*.*" [string tolower $vhostcheck]]} {
  set temp 0
  set results 0
   #$temp<=X X = number of space delimited tokens in the badwords variable.
   while {$temp<=47} {
     foreach x [string tolower $::badwords] {
     if {[string match $x [string tolower $vhostcheck]]} {
     incr results
    incr temp
   unset temp
   if { $results > 0 } {
   putserv "NOTICE $checknick Your Vhost has not been changed to $vhostcheck as it is an invalid/disallowed host."
   } else {
   putserv "GLOBOPS $checknick has changed their vhost to '$vhostcheck'"
   putserv "chghost $checknick $vhostcheck"
   putserv "NOTICE $checknick Your vhost has been changed to '$vhostcheck'"
   putserv "PRIVMSG hostserv set $checknick $vhostcheck"
   putserv "NOTICE $checknick To make the server set your vhost whenver you connect type '/msg hostserv on now'"
  } else {
  putserv "NOTICE $checknick You muse use two '.'s in your vhost"


Sign in to comment.
Junga   -  Oct 21, 2012

does this script also checks if user is registered or not??
if it would have something like checking registered nick and saying "your nick is not registered register your nick before you can set vhost"
like that

xplo   -  Jun 19, 2010

hmm go in dcc chat and type .restart
or .rehash depending on what you wanna do

CrAnK   -  Mar 14, 2010

make ps in shell and kill the procces

AdrianF   -  Nov 04, 2008

How Do u restart the egggdrop so it will work?

mentalglitch   -  May 13, 2008


Get_A_Fix   -  Jan 28, 2008

[quote=Soxide]This script is very usefull indeed but a eggdrop with oper power wouldnt be too good on big servers because some1 could getinto ur bot and mess with stuff.[/quote]

Possibly, but if the bot/conf is secured and you fake version/ctcp etc, people don\'t realise what type of bot/client it is. You can also have it identify/hostmask before it joins channels etc, to make sure people don\'t see the realhost. There are many tricks/things you can do to protect your bot, and I run a couple of oper.eggs on various networks, so I know it can work, if the bot(s) do what they are told that is.

Soxide   -  Apr 28, 2006

This script is very usefull indeed but a eggdrop with oper power wouldnt be too good on big servers because some1 could getinto ur bot and mess with stuff.

Yoinx   -  Feb 04, 2006

maybe your server uses a different format
putserv \"PRIVMSG hostserv set $checknick $vhostcheck\"
that line sends the command to server, it would be
/msg hostserv set nick host
in mirc. if your server doesnt accept that, then you\'d need to change the format. Otherwise, there\'s nothing in the tcl that would generate that error, and it would be in the oline/services config.

Queen   -  Feb 04, 2006

Hi I love this script, one tiny problem is the bot gets a message from hostserv saying access denied. Which is really wierd because he is able to set the vhosts, and oper up correctly. So I think it\'s just a tiny bug. This is the only script I have found so far that will enable my eggy to actually oper up, which is awesome for me for the purposes of this particular bot.

Yoinx   -  Aug 19, 2005

he probably isnt set as a hostsetter in services. Thats something you\'ll have to get your network staff to fix for you as its not a problem with the bot.

himself   -  Aug 19, 2005

I loaded the script all fine... eggy even opers up... however i get an error saying denied axxess.. bot has NetAdmin status, same flags I have.. and I dont get error... any idea why the bot is?
-HostServ (services@GigaCrew.net)- Access denied. <- from dcc chat

Access denied for Enforcer with service HostServ and command set <- in info channel
PoiXon   -  Apr 16, 2005

ok, Thanks :)

Yoinx   -  Apr 16, 2005

poixon, they\'re tcl, and therefore you should use them with whatever they are commented for. This is for an eggdrop. (see title) and you would need an eggdrop somewhere, then you just throw it in a dir, and load it in the conf as a script.

PoiXon   -  Apr 16, 2005

where do we put these snippets?

Hawkee   -  Apr 15, 2005

Thanks for the contribution, I hope to see many more!

Yoinx   -  Apr 15, 2005

Yay, This was the first TCL snippet. Hope it jump starts the section.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.