bind chon - * dcc_chat_1
proc dcc_chat_1 {hand idx} {
if {![matchattr $hand C]} {
putidx $idx "You do not have the proper flags to chat to this bot."
putlog "$hand doesn't have +C flag - killing connection"
killdcc $idx
return 0
}
}
bind filt m ".chatt* * *" filt_chattr1
proc filt_chattr1 {idx arg} {
if {(![string match [string tolower [xindex $arg 0]]* ".chattr"]) || ([pownercheck [idx2hand $idx]]) || (![string match *C* [xindex $arg 2]])} {
return $arg
} else {
putlog "Warning: [idx2hand $idx] attempted to modify the +C flag for [xindex $arg 1] (noaccess)"
putdcc $idx "Only my admin is allowed to set the C flag"
return
}
}
proc pownercheck {checkhand} {
global owner
regsub -all " " $owner "," ownertemp
foreach i [split $ownertemp ,] {
if {[string tolower $i] == [string tolower $checkhand]} {
return 1
}
}
return 0
}
This will only allow ppl with global +C to chat the bot its loaded on. Don't forget to give yourself +C before you load it. Its also written so that only ppl in $owner can change the global C flag, though you could just unbind the chattr filter to stop this. I seriously suggest putting flag C in your private-globals as well to stop modification from a sharebot
Thanks for posting that. I appreciate it I will give it a try.
Though I think the script idea ppslim is working on is a better implementation. I think I'll need to try both out and see which seems more practical. Too many flags gets to be cumbersome.
yah, this will work for all ways of access. yes, it is basic, but its a proven way to work (a lot of botpacks out there use a variation on this method for user authentification)
What I am about to say, is about as true as I invented the internet (roll on Bush)
No I havn't had any luck, but I am a little drunk (notice any typos yet?). I am gonna work on a full solution, or at leate a expandable solution tomorow.
So much for tonight being a night away from the drink, I am worse than ever,
On 2001-11-09 21:16, ppslim wrote:
What I am about to say, is about as true as I invented the internet (roll on Bush)
No I havn't had any luck, but I am a little drunk (notice any typos yet?). I am gonna work on a full solution, or at leate a expandable solution tomorow.
So much for tonight being a night away from the drink, I am worse than ever,
I noticed that you have confused our great president Bush with Al Gore.