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.

Can anyone convert this into TCL please?

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

Can anyone convert this into TCL please?

Post by stevegarbz »

on *:TEXT:*#*:#scrim: { if ($nick !isop $chan) { msg chanserv $chan tb $nick 1h Do not advertise. } }
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Here use this:

Code: Select all

bind pubm - "*" check:advertise

proc check:advertise {nick uhost hand chan text} {
 if {![isbotnick $nick] && [string match "*#*" $text] && [string equal -nocase "#scrim" $chan] && ![isop $nick $chan]} {
  putquick "PRIVMSG chanserv :$chan tb $nick 1h Do not advertise."
  }
}
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

awyeah wrote:bind pubm - "*" check:advertise
...
if {![isbotnick $nick] && [string match "*#*" $text] && [string equal -nocase "#scrim" $chan] && ![isop $nick $chan]} {
...
I would suggest using this bind:
bind pubm - "#scrim *#*?" check:advertise
a) you save code b) you don't ban trailing # hit by accident. c) you wil probably spare some resources ^-^

and clean the if to ![isop $nick $chan].

![isbotnick $nick] is redudant, IRC doesnt echo your own PRIVMSGs!
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
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Well I was just trying todo as that script does exactly. Check if nick is not opped and nick is not botnick is basic. By the way, the trigger is not "#scrim #*", its just "*#*" if you see clearly. The script should only work on the channel #scrim. :)
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
]Kami[
Owner
Posts: 590
Joined: Thu Jul 24, 2003 2:59 pm
Location: Slovenia
Contact:

Post by ]Kami[ »

awyeah wrote:Well I was just trying todo as that script does exactly. Check if nick is not opped and nick is not botnick is basic. By the way, the trigger is not "#scrim #*", its just "*#*" if you see clearly. The script should only work on the channel #scrim. :)
It is "#scrim #*". If you don't belive me, check tcl-commands.doc:
(6) PUBM (stackable)
bind pubm <flags> <mask> <proc>
procname <nick> <user@host> <handle> <channel> <text>

Description: just like MSGM, except it's triggered by things said
on a channel instead of things /msg'd to the bot. The mask is
matched against the channel name followed by the text and can
contain wildcards
. Also, if a line triggers a PUB bind, it will not
trigger a PUBM bind.
And if you want pubm to work on all channels, mask should look like this "% #*" :P
s
stevegarbz
Op
Posts: 104
Joined: Sat Dec 04, 2004 7:25 pm

Post by stevegarbz »

Well, awyeah's version worked just fine! thanks everybody!
Locked