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.

how do i make this in to public command works in dcc chat

Old posts that have not been replied to for several years.
Locked
T
THUGNATURE
Voice
Posts: 13
Joined: Tue Apr 08, 2003 9:14 am

how do i make this in to public command works in dcc chat

Post by THUGNATURE »

proc mass:deop {chan} {
global limbomode modes-per-line
if {$limbomode} {
return 0
}
set type [rand 4]
set nicks ""
foreach nick [getnicks $chan $type] {
if {(![isbotnick $nick]) && ([isop $nick $chan]) && (![matchattr [nick2hand $nick $chan] n|n $chan]) && (![matchattr [nick2hand $nick $chan] b]) && (![matchattr [nick2hand $nick $chan] A])} {
append nicks "$nick "
if {[llength $nicks] >= ${modes-per-line}} {
putquick "MODE $chan -oooooo $nicks"
set nicks ""
}
}
}
if {$nicks != ""} {
putquick "MODE $chan -oooooo $nicks"
}
}
M
MC_8
Voice
Posts: 36
Joined: Sat Apr 26, 2003 5:04 pm
Location: Dallas, Texas
Contact:

Post by MC_8 »

Code: Select all

bind pub !mass_deop proc_name ;# Public command, !mass_deop <channel>
proc proc_name {nick uhost handle channel arg} {
  if {![validchan $arg]} {
    putserv "NOTICE $nick :Invalid channel; $arg"
    return 0
  }
  mass:deop $arg
}
proc mass:deop {channel} { 
  global limbomode 
  if {$limbomode} {return 0}
  foreach user [chanlist $channel] {
    if {[isbotnick $user] || ![isop $user $channel] ||
        [matchattr [nick2hand $nick $channel] Abn|n $channel]} {continue}
    pushmode $channel -o $user
  }
}
Hope that helps.
Carl M. Gregory - MC_8
http://mc.purehype.net/whois/
T
THUGNATURE
Voice
Posts: 13
Joined: Tue Apr 08, 2003 9:14 am

thx

Post by THUGNATURE »

thx for the code ill try it soon :D
Locked