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.

unbind all /msg commands

Old posts that have not been replied to for several years.
Locked
D
Darmoth
Master
Posts: 210
Joined: Sun Oct 07, 2001 8:00 pm
Location: old europe

Post by Darmoth »

Hi,

may be this got asked before, but anyway, is there any way to disable the /msg commands completely ?
I used unbind like it is in the conf for addhost and so on, but I would like to disable the use of /msg completely.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

It is inpossible to remove the use of msg bind completely, as it is needed internaly by eggdrop
bind time - "01 *" unbind:time
proc unbind:time {min hour day month year} {
foreach a [binds msg] {
unbind msg [lindex $a 1] [lindex $a 2] [lindex $a 4]
}
}
That will check once an hour, and remove all msg binds.
D
Darmoth
Master
Posts: 210
Joined: Sun Oct 07, 2001 8:00 pm
Location: old europe

Post by Darmoth »

Thanks alot ppslim.

That should work :smile:
t
ting

Post by ting »

On 2001-12-16 17:54, ppslim wrote:
It is inpossible to remove the use of msg bind completely, as it is needed internaly by eggdrop
bind time - "01 *" unbind:time
proc unbind:time {min hour day month year} {
foreach a [binds msg] {
unbind msg [lindex $a 1] [lindex $a 2] [lindex $a 4]
}
}
That will check once an hour, and remove all msg binds.
What about rebind them all to the same proc, and that proc is a "I'm telling the user I don't support /msg for security reasons, and advice to join the partyline"?

I've got this for my /msg bot OP*:
catch "unbind msg -|- op *msg:op"
bind msg - op give_ops

proc give_ops {nick host hand text} {
global botnick
putserv "NOTICE $nick :Soory $nick, but I do no longer accept 02/msg $botnick OP <password>02. Please join the partyline and gain @ by typing ".op"! (02/dcc chat $botnick02)"
}
Can someone rewrite this, so that ALL msgs point to such a message?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Note: this is one sure way to make IRCop's know this is a bot.
proc msg:replace {nick uh hand arg} {
global lastbind botnick
puthelp "NOTICE $nick :Sorry $nick - I no longer support the "/msg ${botnick{ ${lastbind}" command for security reasons"
puthelp "NOTICE $nick :You should join the partyline from no on"
}

foreach a [binds msg] {
if {[lindex $a 2] != "msg:replace"} {
unbind msg [lindex $a 1] [lindex $a 2] [lindex $a 4]
bind msg - [lindex $a 2] msg:replace
}
}
}
This should provide a notice, telling the user, such a message command is no longer supported. Which command is displayed, but not it's usage, else it would be a larger script.
Locked