proc pub_addavoice {nick uhost hand channel text} {
global botnick
set person [lindex [split $text] 0]
if {$person == ""} {
puthelp "NOTICE $nick : You must give a nick to add. Use !addavoice <nick_to_be_added>"
return 0
}
set per_ip [getchanhost $person]
set per_host [maskhost $person!$per_ip]
set host [lindex [split $text] 1]
if {$host == ""} {
set host $per_host
}
set kadd [adduser $person $host]
if {$kadd == 1} {
chattr $person +h|+gv $channel
pushmode $channel +v $person
putserv "NOTICE $nick :Successfully added $person as an autovoice with host $host "
putserv "NOTICE $person :You were added to my user list by $nick as an autovoicesubop with host $host.Please set up y$
} (
if {$hand != "*"} {
if {[matchattr $hand -|g $channel]} {
putserv "NOTICE $nick :The user is already in the bot as an autovoice .."
return 0
}
if {[matchattr $hand -|o $channel]} {
putserv "NOTICE $nick :This user is already in the bots as an channelops .."
return 0
}
}
}
The adding of the user pretty mutch works.
The problem is that if the user is already in the userfile i have to say that he is already is an autovoice of an op or whatever. That doesn't work.
if {[validuser [nick2hand $person]]} {
puthelp "NOTICE $nick :Sorry, but $person is already an known user. It's user is [nick2hand $person]"
return }
yeah i already had something like that but that was not wat i intended.
It had to say that it's already in the bot as an channel op of channelvoice or whatever the flags he already has
Well, from "The problem is that if the user is already in the userfile i have to say that he is already is an autovoice of an op or whatever." I have understood what I've typer earlier. Then if this not what you need the what you want? Be more precisly..
Once the game is over, the king and the pawn go back in the same box.
caesar wrote:Well, from "The problem is that if the user is already in the userfile i have to say that he is already is an autovoice of an op or whatever." I have understood what I've typer earlier. Then if this not what you need the what you want? Be more precisly..
Nevermind i already got my answer from somebody else.
Thanks for the help anyway