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.

Script

Old posts that have not been replied to for several years.
Locked
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Script

Post by stevegarbz »

Would anyone mind converting this into .tcl:

Code: Select all

on *:TEXT:*#*:#energex:{
  if (($nick isop $chan) || ($nick isvoice $chan)) || ($1 == #energex) { halt }
  else {
    if (!%adv. [ $+ [ $nick ] ]) { set %adv. $+ $nick 1 | .notice $nick Please do not advertise in $chan $+ ! You have been warned. }
    elseif (%adv. [ $+ [ $nick ] ] == 1) { inc %adv. $+ $nick | /msg chanserv tb #energex $nick 30m Do Not Advertise in $chan $+ ! This is your second 

warning. 30 minute timeban. Please refer to the GameSurge AUP: www.gamesurge.net $+ / $+ aup [Rule 3] }
    else {
      /msg chanserv addban #energex $nick Do Not Advertise in $chan $+ ! That was your last warning. You have been banned. Please refer to the GameSurge 

AUP: www.gamesurge.net $+ / $+ aup [Rule 3]
      unset %adv. $+ $nick 
    }
  }
}
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Some what a rough translation of this mIRC code, into TCL:

Code: Select all

bind pubm - "*" my:proc

proc my:proc {nick uhost hand chan text} {
 global adv_nick
  if {[isop $nick $chan] || [isvoice $nick $chan] || [isbotnick $chan] || [string equal -nocase "#energex" [lindex $text 0]]} { return 0 }
  if {[string match "*#*" $text] && [string equal -nocase "#energex" $chan]} {
   if {![info exists adv_nick($nick)]} {
    set adv_nick($nick) 1
    putserv "NOTICE $nick :Please do not advertise in $chan! You have been warned."
   } elseif {$adv_nick($nick) == 1} {
       incr adv_nick($nick)
       putserv "PRIVMSG chanserv :tb #energex $nick 30m Do Not Advertise in $chan! This is your second warning. 30 minute timeban. Please refer to the GameSurge AUP: www.gamesurge.net/aup \[Rule 3\]"
   } esle {
       putserv "PRIVMSG chanserv :addban #energex $nick Do Not Advertise in $chan! That was your last warning. You have been banned. Please refer to the GameSurge AUP: www.gamesurge.net/aup \[Rule 3\]"
       unset adv_nick($nick)
     }
  }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
-
-W0kk3L-
Voice
Posts: 24
Joined: Sun Feb 23, 2003 7:23 pm

Post by -W0kk3L- »

Rough code indeed :)

Code: Select all

   } esle {  
But nice piece of code ;b
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

and [lindex $text 0] should be [lindex [split $text] 0] ^-^.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Re: Script

Post by Sir_Fz »

stevegarbz wrote:Would anyone mind converting this into .tcl
If you're interrested in using these punishment methods to other types of floods as well, Try using allfloodprotection3.7b.tcl. You can choose different types of punishments like warn first then kick or kickban...etc and it can be done with several types of floods.
Locked