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.

vHost-Script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
L
Legionar
Voice
Posts: 4
Joined: Wed Jul 19, 2006 6:47 pm

vHost-Script

Post by Legionar »

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 :)

TLD's:

Code: Select all

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: Select all

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 :D
Post Reply