- Home»
- Cod sursa: copyflags.tcl
copyflags.tcl
copyflags.tcl
TL script that adds a dcc command that lets you copy all users flags from one channel to another. use: .copyflags #fromchan #tochan
| Postat de | Copyright | Categorie | Review user | Vizualizari | Data |
|---|---|---|---|---|---|
| btc | toot | chanops | Cod testat | 507 | 2023-12-24 23:48:52 |
# copyflags.tcl by toot <toot@melnet.co.uk>
# adds a dcc command that lets you copy all users
# flags from one channel to another.
# use: .copyflags #fromchan #tochan
# tested on eggdrop 1.4.2, 1.5.1 and 1.3.27+w32
# 6/1/2000
bind dcc n copyflags dcc:cf_copyflags
proc dcc:cf_copyflags {hand idx arg} {
set cf_fromchan [lindex [split $arg] 0]
set cf_tochan [lindex [split $arg] 1]
if {$cf_fromchan == "" || $cf_tochan == ""} {
putdcc $idx "usage: .copyflags #fromchan #tochan"
return
}
if {![validchan $cf_fromchan] || ![validchan $cf_tochan]} {
putdcc $idx "both channels must be in the bots channel file"
return
}
foreach user [userlist] {
set flags [chattr $user $cf_fromchan]
chattr $user $flags $cf_tochan
}
putcmdlog "#$hand# copyflags $cf_fromchan $cf_tochan"
putdcc $idx "flags sucessfully copied from $cf_fromchan to $cf_tochan"
}
IRC Snippets