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.

Set or remove "Silence"

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Set or remove "Silence"

Post by gemeau50 »

Our eggdrop is permanently under Silence. What I am looking for is a snippet which would remove "Silence" when a said nick parts a particular channel or quits and set "Silence" when the said nick gets ops on that particular channel.

Tx in advance
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

Since not all IRCds have a "silence" command, you may need to provide the command syntax.
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Post by gemeau50 »

Network: Undernet
Set: /silence *.*@*
Remove /silence -*.*@*
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

I haven't tested this, but it should give you a good starting point if nothing else.

Code: Select all

# can contain wildcards such as nick*!*@*, but has to be in nick!user@host format
set swho "nick!*@*" 

bind join - $swho silence_join
bind part - $swho silence_part

proc silence_join {n u h c} {putquick "SILENCE *.*@*"}
proc silence_part {n u h c} {putquick "SILENCE -*.*@*"}
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Post by gemeau50 »

Since "PART" is to leave a channel and "QUIT" is to leave a network, do /part and /quit the same in TCL or do I have to bind QUIT also?

Also your join and part procedure do not provide for a specific channel.
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

gemeau50 wrote:Since "PART" is to leave a channel and "QUIT" is to leave a network, do /part and /quit the same in TCL or do I have to bind QUIT also?

Also your join and part procedure do not provide for a specific channel.
doc/tcl-commands.doc wrote: bind join <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel>

Description: triggered by someone joining the channel. The mask in
the bind is matched against "#channel nick!user@host" and can
contain wildcards.


bind part <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel> <msg>

Description: triggered by someone leaving the channel. The mask is
matched against "#channel nick!user@host" and can contain
wildcards.


bind sign <flags> <mask> <proc>

procname <nick> <user@host> <handle> <channel> <reason>

Description: triggered by a signoff, or possibly by someone who got
netsplit and never returned. The signoff message is the last
argument to the proc. Wildcards can be used in the mask, which is
matched against '#channel nick!user@host'.
As the channel name is part of the string matched against the mask, you HAVE to include a part to match it (starting the mask with a nick would make it never match)
The sign bind can trigger your part proc because they pass the same number of arguments. You might also want to include splt and rejn binds (if your wait-split setting is > 0)
Have you ever read "The Manual"?
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Post by gemeau50 »

Rather than trying to explain to you what I'm looking for, let me give it to you in mIRC script. I'm hoping the someone will be kind enough to convert it in TCL.

Code: Select all

on *:join:channelname: { if ($address == cservice@undernet.org) { silence *!*@* } }
on *:part:channelname: { if ($address == cservice@undernet.org) { silence -*!*@* } }
on *:quit: { if ($address == cservice@undernet.org) { -silence *!*@* } }
TX
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

I don't know mIRC script, but I guess you want something like this...

Code: Select all

bind join - "#chan *!cservice@undernet.org" {silence +}
bind part - "#chan *!cservice@undernet.org" {silence -}
bind sign - "#chan *!cservice@undernet.org" {silence -}

proc silence {prefix args} {putserv "SILENCE $prefix*!*@*"}
Have you ever read "The Manual"?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

# can contain wildcards such as nick*!*@*, but has to be in
# nick!user@host format
set swho *!cservice@undernet.org

bind join - "#channelname $swho" silence:control
bind part - "#channelname $swho" silence:control
bind sign - "#channelname $swho" silence:control

proc silence:control {n u h c args} {
 if {[llength $args]} {
  putserv "SILENCE -*!*@*"
 } {
  putserv "SILENCE *!*@*"
 }
}
Edit: user was faster ;)
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

gemeau50 wrote:Also your join and part procedure do not provide for a specific channel.
You failed to provide that information.
User avatar
user
&nbsp;
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: Set or remove "Silence"

Post by user »

gemeau50 wrote:... when a said nick parts a particular channel ...
:wink:
Have you ever read "The Manual"?
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

DragnLord wrote:I haven't tested this, but it should give you a good starting point if nothing else.
:wink:
g
gemeau50
Voice
Posts: 38
Joined: Fri Jun 11, 2004 6:16 am
Location: Trois-Rivières, Canada

Post by gemeau50 »

Tx! It does what I wanted the bot to do.

Regards
Post Reply