|
 |
|
 |
| |
| |
 |
Ro-Tcl
Aici Gasesti Tot Felul De Tcl`uri
|
 |
|
Acum este: 12/10/2026 09:59
|
| Autor |
Mesaj |
MeBoy Junior

Data inscrierii: 30/Iun/2008 Mesaje: 5
|
Trimis: 01/07/2008 14:26 Titlul subiectului: addop.tcl |
|
|
| Cod: | # AddOp Script v2.0 for Eggdrop 1.3.x by MeBoy <MeBoy2oo7@yahoo.com>
# http://meboy.go.ro (my homepage)
#
# This script is originally by MeBoy.
# I made it suitable for eggdrop 1.3.x and made some useful changes
# for using with the new flag-system.
##########################################################################
# Allows masters and owners to add global users with +of-flags (.addsop)
# Allows channelmasters, channelowners, masters and owners
# to add users with +of on their channels (.addop).
#
# Commands (pub):
# .addop <nick> <flags> - Adds an Op for that channel only ; <flags> changes flags for user
# on that channel as well
# .addsop <nick> <flags> - Adds an Op for all channels ; <flags> updates
# flags for all channels.
#
##########################################################################
set newflags "of"
# Flags for new ops
set addopflag "m|m"
# Flag required to add channelop (&m = Channelmaster, &n = Channelowner etc.)
set addsopflag "m"
# Flag required to add global op
#########################################################################
# DO NOT EDIT ANYTHING BELOW
#########################################################################
bind pub $addopflag .addop add_op_norm
proc add_op_norm {n u h c a} {
global botnick newflags
if {[lindex $a 0] == ""} {
putserv "NOTICE $n :Format: .addop <nickname> <extra flags>"
putserv "NOTICE $n :Extra Flags: n(owner), m (master), f (friend)"
return 1
}
set newop [lindex $a 0]
if {[onchan $newop $c] == 0} {
putserv "NOTICE $n :$newop is not on $c. You will need to add him/her manually through a DCC chat"
return 1
}
if {[lindex $a 1] != ""} {
set exflags [lindex $a 1]o
} { set exflags $newflags }
set newhost [maskhost [getchanhost $newop $c]]
if {[validuser $newop] == 1} {
if {[lsearch [getuser $newop hosts] $newhost] == "-1"} {
putserv "NOTICE $n :$newop exists in my database. Adding flags and hostmask."
chattr $newop |+$newflags $c
setuser $newop hosts $newhost
putserv "NOTICE $newop :Your flags have been upgraded to $exflags on $c and your new host \[$newhost\] has been added."
return 1
} {
putserv "NOTICE $n :$newop exists in my database. Adding flags."
chattr $newop |+$newflags $c
putserv "NOTICE $newop :Your flags have been upgraded to $exflags on $c."
return 1 }
}
if {[finduser $newhost] != "*"} {
putserv "NOTICE $n :$newop\[$newhost\] is known as user [finduser $newhost]"
return 1
}
adduser $newop $newhost
if {[chattr $newop |+$newflags $c] == "*"} {
putserv "NOTICE $n :Error adding flags to $newop."
return 1
}
putserv "NOTICE $n :$newop\[$newhost\] has been added $exflags on $c"
putserv "NOTICE $newop :Congradulations $newop!"
putserv "NOTICE $newop :$n has given you Ops with flags $exflags on $c."
putserv "NOTICE $newop :Please set a password: /msg $botnick pass <password>"
putserv "NOTICE $newop :where <password> is your selected password."
putserv "NOTICE $newop :You can get ops by: /msg $botnick op <password>"
save
}
bind pub $addsopflag .addsop add_op_super
proc add_op_super {n u h c a} {
global botnick newflags
if {[lindex $a 0] == ""} {
putserv "NOTICE $n :Format: .addsop <nickname> <extra flags>"
putserv "NOTICE $n :Extra Flags: n(owner), m (master), f (friend)"
return 1
}
set newop [lindex $a 0]
if {[onchan $newop $c] == 0} {
putserv "NOTICE $n :$newop is not on $c. You will need to add him/her manually through a DCC chat"
return 1
}
if {[lindex $a 1] != ""} {
set exflags [lindex $a 1]o
} { set exflags $newflags }
set newhost [maskhost [getchanhost $newop $c]]
if {[validuser $newop] == 1} {
if {[lsearch [getuser $newop hosts] $newhost] == "-1"} {
putserv "NOTICE $n :$newop exists in my database. Adding flags and hostmask."
chattr $newop |+$newflags $c
setuser $newop hosts $newhost
putserv "NOTICE $newop :Your flags have been upgraded to $exflags and your new host \($newhost\) has been added."
return 1
} {
putserv "NOTICE $n :$newop exists in my database. Adding flags."
chattr $newop |+$newflags $c
putserv "NOTICE $newop :Your flags have been upgraded to $exflags."
return 1 }
}
if {[finduser $newhost] != "*"} {
putserv "NOTICE $n :$newop\[$newhost\] is known as user [finduser $newhost]"
return 1
}
adduser $newop $newhost
chattr $newop |+$newflags
putserv "NOTICE $n :$newop\[$newhost\] has been added with flags $exflags"
putserv "NOTICE $newop :WOW! Congradulations $newop!"
putserv "NOTICE $newop :$n has given you SuperOps with flags $exflags on all channels I am on."
putserv "NOTICE $newop :Please set a password: /msg $botnick pass <password>"
putserv "NOTICE $newop :where <password> is your selected password."
putserv "NOTICE $newop :You can get ops by: /msg $botnick op <password>"
save
}
putlog "Addop v2.0 for Eggdrop1.3.x by MeBoy loaded..." |
Acest tcl a fost facut de mine dupa addvoice.tcl (autorul la acel tcl nu era scris) _________________ #U&U Reprezentative |
|
| Sus |
|
|
Nu puteti crea un subiect nou in acest forum Nu puteti raspunde in subiectele acestui forum Nu puteti modifica mesajele proprii din acest forum Nu puteti sterge mesajele proprii din acest forum Nu puteti vota in chestionarele din acest forum
|
| |
 |
|
 |
|
|