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 

vHost-Script

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


Joined: 19 Jul 2006
Posts: 4

PostPosted: Thu Jul 20, 2006 5:52 am    Post subject: vHost-Script Reply with quote

The script works fine, but I need additionally still a TLD-check. If the TLD is true, register the new vHost, if not - then not Smile

TLD's:

Code:

set tldcheck { *.*.ac *.*.ac.uk *.*.ad *.*.ae *.*.af *.*.ag  *.*.ai *.*.al *.*.am *.*.an *.*.ao *.*.aq *.*.ar *.*.as *.*.at *.*.au *.*.aw *.*.az *.*.ba *.*.bb *.*.bd *.*.be *.*.bf *.*.bg *.*.bh *.*.bi *.*.bj *.*.bm *.*.bn *.*.bo *.*.br *.*.bs *.*.bt *.*.bv *.*.bz *.*.ca *.*.cc *.*.cd *.*.cf *.*.cg *.*.ch *.*.ci *.*.ck *.*.cl *.*.cm *.*.cn *.*.co *.*.co.uk *.*.com *.*.cr *.*.cs *.*.cu *.*.cy *.*.cz *.*.de *.*.dj *.*.dk *.*.dm *.*.do *.*.dz *.*.ec *.*.edu *.*.ee *.*.eg *.*.eh *.*.er *.*.es *.*.et *.*.fi *.*.fj *.*.fk *.*.fm *.*.fo *.*.fr *.*.biz *.*.coop *.*.info *.*.name *.*.pro }



The working script without the TLD-check:

Code:
set channel "#vhost"
set operid "vhostagent"
set operpass "ircxvhostagents"
 
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 Willkommen im $noticechan!"
   putserv "NOTICE $noticenick Du brauchst einen registrierten Nicknamen, um eine vHost-Registration ausführen zu können!"
   putserv "NOTICE $noticenick Um deinen Host zu ändern, tippe: !vhost gewünschter.vhost.ch - danach erhälst du eine Nachricht."
  }
}
proc vhost {vhostnick vhosthost vhosthand vhostchan vhosttext} {
 if { $vhostchan == $::channel } {
   checkvhost $vhostnick $vhosttext
 }
}
set badwords { *<censored>* *-.-* *@* *g0v* *admin* *serv* *staff* *ircop* *staff* *support* *helpop* *oper* *[censored]* *gay* *fag* *dick* *suck* *[censored]* *asshole* *zub* *bitch* *cock* *[censored]* *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 Dein vHost $vhostcheck wurde nicht geändert. Der vHost ist nicht zugelassen."
   } else {
   putserv "GLOBOPS $checknick hat seinen vHost geändert zu: '$vhostcheck'"
   putserv "chghost $checknick $vhostcheck"
   putserv "NOTICE $checknick Dein vHost wurde zu '$vhostcheck' geändert"
   putserv "PRIVMSG hostserv set $checknick $vhostcheck"
   putserv "NOTICE $checknick Um den neuen vHost zu aktivieren, brauchst du lediglich noch '/msg hostserv on' einzugeben."
   }
  } else {
  putserv "NOTICE $checknick Du musst mindestens zwei Punkte '.' in denem vHost benutzen. Beispiel: 'example-vhost.chat.net'"
  }
}



Sorry for my bad English Very Happy
Back to top
View user's profile Send private message
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