egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How do I bind to Chanserv messages?

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Acadian
Voice


Joined: 27 Sep 2009
Posts: 1

PostPosted: Sun Oct 27, 2013 8:50 am    Post subject: How do I bind to Chanserv messages? Reply with quote

How do you bind to messages from chanserv,

E.g. An unauthorized user enters a channel that is restricted and gets booted and banned from the channel. Chanserv bans, boots then announces it to the channel. I'm trying to pick up this announcement and remove the ban, because sometimes ops don't ident properly and then they have to wait for someone to unban them.

I tried bind pub, bind pubm, bind msgm etc.

I checked in the partyline with .bind and I can see the binds, but my proc never gets executed.

Code:

bind MODE - "% +b" unban

proc unban {nick uhost hand chan mode} {
resetbans $chan
putserv "PRIVMSG $chan :Tsk tsk how dare they enter without permission"
}


Thanks
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sun Oct 27, 2013 11:21 am    Post subject: Re: How do I bind to Chanserv messages? Reply with quote

Acadian wrote:

...
I tried bind pub, bind pubm, bind msgm etc.

...


Could it be a notice?

Check out
bind notc
here: http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html


I hope this helps.
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Wed Nov 06, 2013 7:40 pm    Post subject: Reply with quote

No, it's a bind mode.

Wich eggdrop version are you using ? Peharps the target argument is lacking, don't you have any error in party-line (with console +d) ?
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Wed Nov 06, 2013 7:54 pm    Post subject: Reply with quote

CrazyCat wrote:
No, it's a bind mode.
...


It is?

Quote:

... I'm trying to pick up this announcement ...



Ok.
I was considering the above quoted when I said that.
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Wed Nov 06, 2013 7:59 pm    Post subject: Reply with quote

The annoucement is a client interpretation of the irc raw (or mode).
Chanserv doesn't make any notice or message when adding a ban, so an eggdrop can just catch a mode change.
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Wed Nov 06, 2013 8:15 pm    Post subject: Reply with quote

CrazyCat wrote:
The annoucement is a client interpretation of the irc raw (or mode).
Chanserv doesn't make any notice or message when adding a ban, so an eggdrop can just catch a mode change.


ah... ok.
Got it.
Tnx.
Back to top
View user's profile Send private message
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Wed Nov 06, 2013 8:19 pm    Post subject: Re: How do I bind to Chanserv messages? Reply with quote

Acadian wrote:


...
Code:

bind MODE - "% +b" unban

proc unban {nick uhost hand chan mode} {
resetbans $chan
putserv "PRIVMSG $chan :Tsk tsk how dare they enter without permission"
}





I just tried your above code, and the problem quickly appears.

Go here:
http://www.eggheads.org/support/egghtml/1.6.21/tcl-commands.html
and find:
MODE (stackable)

and read about bind mode.

See:
proc-name <nick> <user@host> <handle> <channel> <mode-change> <target>

You have the wrong number of arguments for a bind mode.

Fix that, and it works:
Chanserv bans a user that is on the akick list, immediately upon them joining. Bot makes announcement in channel, and removes the just-set ban.

I hope this helps.
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Fri Nov 08, 2013 3:54 am    Post subject: Re: How do I bind to Chanserv messages? Reply with quote

willyw wrote:
See:
proc-name <nick> <user@host> <handle> <channel> <mode-change> <target>

You have the wrong number of arguments for a bind mode.

This is exactly the reason for wich I asked for the eggdrop version.
The proc syntax is right, for eggdrop less than 1.3.18. Quite old, I know Smile
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
caesar
Mint Rubber


Joined: 14 Oct 2001
Posts: 3741
Location: Mint Factory

PostPosted: Fri Nov 08, 2013 12:41 pm    Post subject: Reply with quote

Quote:

Also, due to a typo, mode binds were broken completely in 1.3.17 but were fixed in 1.3.18. Mode bindings are not triggered at all in 1.3.17.

I wouldn't be surprised if he has 1.3.17. Very Happy
_________________
Once the game is over, the king and the pawn go back in the same box.
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sat Nov 09, 2013 9:37 am    Post subject: Reply with quote

Peharps he found a shell setted in 2000 Smile
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
willyw
Revered One


Joined: 15 Jan 2009
Posts: 1175

PostPosted: Sat Nov 09, 2013 9:42 am    Post subject: Reply with quote

CrazyCat wrote:
Peharps he found a shell setted in 2000 Smile


That was just yesterday....

Here's the CPU from my first shell:
http://tinyurl.com/7vf5kw2


Wink
Back to top
View user's profile Send private message
CrazyCat
Revered One


Joined: 13 Jan 2002
Posts: 1032
Location: France

PostPosted: Sat Nov 09, 2013 9:48 am    Post subject: Reply with quote

Why did I follow this link ??? Laughing

But being a little bit more serious: we often find tcl examples outdated, so before any question we (I include myself) must think "is the syntax up to date ?" and check the tcl-commands.doc
_________________
https://www.eggdrop.fr - French IRC network
Offer me a coffee - Do not ask me help in PM, we are a community.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber