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.

Need some help

Old posts that have not been replied to for several years.
Locked
b
bobjuh
Master
Posts: 268
Joined: Wed Oct 03, 2001 8:00 pm
Location: Netherlands
Contact:

Need some help

Post by bobjuh »

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.

Can anybody help me please ?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Then use something like this:

Code: Select all

if {[validuser [nick2hand $person]]} {
  puthelp "NOTICE $nick :Sorry, but $person is already an known user. It's user is [nick2hand $person]"
return }
Once the game is over, the king and the pawn go back in the same box.
b
bobjuh
Master
Posts: 268
Joined: Wed Oct 03, 2001 8:00 pm
Location: Netherlands
Contact:

Post by bobjuh »

caesar wrote:Then use something like this:

Code: Select all

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
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

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.
b
bobjuh
Master
Posts: 268
Joined: Wed Oct 03, 2001 8:00 pm
Location: Netherlands
Contact:

Post by bobjuh »

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
Locked