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.
Old posts that have not been replied to for several years.
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Fri Oct 24, 2003 11:31 pm
Hi
i wonder if it is possible to do a command like .chut (handle) and it cuts the ability for this person to say something in partyline until i type .chut (handle ) off ??
thanks for all advice that may be handy
Pitchat
duofruo
Halfop
Posts: 94 Joined: Thu Oct 23, 2003 3:17 pm
Location: Ploiesti@.ro
Contact:
Post
by duofruo » Sat Oct 25, 2003 2:54 am
I think u may remove the +p ability of that person
It`s an idea i dont know for user, i am new in eggdrop.
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Sat Oct 25, 2003 9:46 am
Use the bind filt and a certain flag (in this case M) like this:
Code: Select all
bind filt - ".status *" dcc:allow
proc dcc:allow {idx args} {
set usernick [idx2hand $idx]
if {[lindex $args 1] == ""} {
set icmd [lindex $args 0]
set args "$icmd "
}
if {![matchattr $usernick M]} {
putdcc $idx "What? You need '.help'"
} else {
return $args
}
}
Once the game is over, the king and the pawn go back in the same box.
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Sat Oct 25, 2003 11:03 am
This will make the user defined flag P required to speak on the partyline (or any other botnet channel):
Code: Select all
bind filt - * chatChk
proc chatChk {i t} {
if {[catch {getchan $i}]||[string match .* $t]||[matchattr [idx2hand $i] P]} {set t}
}
Have you ever read "The Manual"?
strikelight
Owner
Posts: 708 Joined: Mon Oct 07, 2002 10:39 am
Contact:
Post
by strikelight » Sat Oct 25, 2003 11:53 am
It would be more practical to make it so chattr'ing a user with a flag would mean that they can't speak on the partyline.. As if you have 300 users, you wouldn't want to chattr each one with +P just so they can speak on the partyline, when all you want to do is mute a few select users...
ie.
Code: Select all
bind filt - * chatChk
proc chatChk {i t} {
if {[catch {getchan $i}]||[string match .* $t]||![matchattr [idx2hand $i] M]} {set t}
}
So this would mean +M users would not be able to speak on the partyline.
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Sat Oct 25, 2003 7:27 pm
so is it possible tu bind this to a command like .chut (nick ) and it will put the +m flag to the (nick) and remove ihis ability to speak on the partyline ?
strikelight
Owner
Posts: 708 Joined: Mon Oct 07, 2002 10:39 am
Contact:
Post
by strikelight » Sat Oct 25, 2003 8:41 pm
all you need to do is .chattr <handle> +M
but, yes, you can make an alias for doing this, for use
with the previous mentioned code:
Code: Select all
bind dcc n chut dcc:chut
proc dcc:chut {hand idx text} {
if {[set chuthand [lindex [split $text] 0]] == ""} {
putdcc $idx "Usage: .chut <handle>"
return 0
} elseif {![validuser $chuthand]} {
putdcc $idx "Invalid user ${chuthand}!"
return 0
} elseif {[set onoff [string tolower [lindex [split $text] 1]]] == "on"} {
if {[matchattr $chuthand M]} {
putdcc $idx "User $chuthand is already muted."
return 0
}
chattr $chuthand +M
putdcc $idx "User $chuthand is now muted."
} elseif {$onoff == "off"} {
if {![matchattr $chuthand M]} {
putdcc "$idx "User $chuthand is not muted."
return 0
}
chattr $chuthand -M
putdcc $idx "User $chuthand is no longer muted."
}
set res 1
}
Last edited by
strikelight on Sat Oct 25, 2003 8:50 pm, edited 1 time in total.
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Sat Oct 25, 2003 8:49 pm
great it works but to remove the "chut" what i have to do is .chattr nick -M is it right ? ( cause .-chut nick doesnt work)
strikelight
Owner
Posts: 708 Joined: Mon Oct 07, 2002 10:39 am
Contact:
Post
by strikelight » Sat Oct 25, 2003 8:51 pm
Pitchat wrote: great it works but to remove the "chut" what i have to do is .chattr nick -M is it right ? ( cause .-chut nick doesnt work)
i modified the code to reflect this..
you do '.chut <handle> on' to mute and '.chut <handle> off' to unmute.
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Sat Oct 25, 2003 9:30 pm
great ! sorry not to have read carefully the last time i have one more simple request , when i do .chut (handle) on i`d like the user to be warn that he is currently under the ".chut " but a putdcc $chuthand doesnt work how can i do that ?
thanks
strikelight
Owner
Posts: 708 Joined: Mon Oct 07, 2002 10:39 am
Contact:
Post
by strikelight » Sat Oct 25, 2003 11:12 pm
If you mean do notice the user IF they are on the partyline when .chut is called upon them, then you would make the code:
Code: Select all
bind dcc n chut dcc:chut
proc dcc:chut {hand idx text} {
if {([set chuthand [lindex [split $text] 0]] == "") || (([set onoff [string tolower [lindex [split $text] 1]]] != "on") && ($onoff != "off"))} {
putdcc $idx "Usage: .chut <handle> <on|off>"
return 0
} elseif {![validuser $chuthand]} {
putdcc $idx "Invalid user ${chuthand}!"
return 0
} elseif {$onoff == "on"} {
if {[matchattr $chuthand M]} {
putdcc $idx "User $chuthand is already muted."
return 0
}
chattr $chuthand +M
if {[set chidx [hand2idx $chuthand]] > -1} {
putdcc $chidx "You have now been muted at request of $hand."
}
putdcc $idx "User $chuthand is now muted."
} elseif {$onoff == "off"} {
if {![matchattr $chuthand M]} {
putdcc "$idx "User $chuthand is not muted."
return 0
}
chattr $chuthand -M
if {[set chidx [hand2idx $chuthand]] > -1} {
putdcc $chidx "You have been unmuted at request of $hand."
}
putdcc $idx "User $chuthand is no longer muted."
}
set res 1
}
If you mean they get a notice whenever they try to type on the partyline:
Code: Select all
bind filt - * chatChk
proc chatChk {i t} {
if {[catch {getchan $i}]||[string match .* $t]||![matchattr [idx2hand $i] M]} {
set t
} else {
putdcc $i "You are currently muted and not allowed to speak on the partyline."
set res ""
}
}