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.

dccbroadcast to special flags only

Old posts that have not been replied to for several years.
Locked
P
Pitchat
Op
Posts: 122
Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:

dccbroadcast to special flags only

Post by Pitchat »

heres the code

Code: Select all

proc join:indesirable {nick host hand chan} {
	global CanalPrincipal
    set msg "Avertir $nick : [getuser $nick $arg] (par [getuser $nick XTRA ADD])"
  dccbroadcast $msg  foreach adm [userlist +mP] { putquick "NOTICE $adm :$msg" }
the purpose of that is to warn only people with +mP flags when a user ( who is predefined elsewhere in the script) join a channel where the bot sits.

i`d like to know if it is possible tu assign flags to the dcc broadcast command or if it will be better to use putdcc (flag) message

thanks
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

check eggdrop manual (docfile)
bind join <flags> <mask> <proc>

Code: Select all

bind join m|P * join:indesirable 
think that this should do it
XplaiN but think of me as stupid
User avatar
CrazyCat
Revered One
Posts: 1359
Joined: Sun Jan 13, 2002 8:00 pm
Location: France
Contact:

Post by CrazyCat »

Ofloo wrote:

Code: Select all

bind join m|P * join:indesirable 
hum, only global master AND local P flagged?
I'm not sure of this :)
You'd better try:

Code: Select all

bind join P * join:indesirable
proc join:indesirable {nick host hand chan} {
   global CanalPrincipal
   if { [matchattr $hand m] } {
      set msg "Avertir $nick : [getuser $nick $arg] (par [getuser $nick XTRA ADD])"
      dccbroadcast $msg  foreach adm [userlist +mP] { putquick "NOTICE $adm :$msg" } 
   } else {
      return 0
   }
}
This look for P flag, and if it's setted, it'll look for m flag.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

why not bind for mP|mP (local or global)
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

oh well i knew it was something like that .. wasn't sur thats why i referd to manual :p
XplaiN but think of me as stupid
Locked