| View previous topic :: View next topic |
| Author |
Message |
gemeau50 Voice
Joined: 11 Jun 2004 Posts: 38 Location: Trois-Rivières, Canada
|
Posted: Mon Mar 24, 2008 8:01 am Post subject: Set or remove "Silence" |
|
|
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 |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Mon Mar 24, 2008 11:07 am Post subject: |
|
|
| Since not all IRCds have a "silence" command, you may need to provide the command syntax. |
|
| Back to top |
|
 |
gemeau50 Voice
Joined: 11 Jun 2004 Posts: 38 Location: Trois-Rivières, Canada
|
Posted: Mon Mar 24, 2008 11:26 am Post subject: |
|
|
Network: Undernet
Set: /silence *.*@*
Remove /silence -*.*@* |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Mon Mar 24, 2008 11:51 am Post subject: |
|
|
I haven't tested this, but it should give you a good starting point if nothing else.
| Code: | # 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 -*.*@*"} |
|
|
| Back to top |
|
 |
gemeau50 Voice
Joined: 11 Jun 2004 Posts: 38 Location: Trois-Rivières, Canada
|
Posted: Wed Mar 26, 2008 8:08 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Wed Mar 26, 2008 8:48 am Post subject: |
|
|
| 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"? |
|
| Back to top |
|
 |
gemeau50 Voice
Joined: 11 Jun 2004 Posts: 38 Location: Trois-Rivières, Canada
|
Posted: Thu Mar 27, 2008 8:46 am Post subject: |
|
|
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.
TX |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Thu Mar 27, 2008 10:02 am Post subject: |
|
|
I don't know mIRC script, but I guess you want something like this...
| Code: | 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"? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Mar 27, 2008 10:02 am Post subject: |
|
|
| Code: | # 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  _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Mar 27, 2008 11:45 am Post subject: |
|
|
| gemeau50 wrote: | | Also your join and part procedure do not provide for a specific channel. |
You failed to provide that information. |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Thu Mar 27, 2008 4:43 pm Post subject: Re: Set or remove "Silence" |
|
|
| gemeau50 wrote: | | ... when a said nick parts a particular channel ... |
 _________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
DragnLord Owner

Joined: 24 Jan 2004 Posts: 711 Location: C'ville, Virginia, USA
|
Posted: Thu Mar 27, 2008 11:29 pm Post subject: |
|
|
| DragnLord wrote: | | I haven't tested this, but it should give you a good starting point if nothing else. |  |
|
| Back to top |
|
 |
gemeau50 Voice
Joined: 11 Jun 2004 Posts: 38 Location: Trois-Rivières, Canada
|
Posted: Fri Mar 28, 2008 2:52 pm Post subject: |
|
|
Tx! It does what I wanted the bot to do.
Regards |
|
| Back to top |
|
 |
|