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.

Auto Auth System

Old posts that have not been replied to for several years.
Locked
T
TriPpen^KiSs

Post by TriPpen^KiSs »

I have been scripting for a while and are getting some upgrades to my bot (the harder stuff).. I made a Auth System for my bot and when the person parts a chan it Deauths them..

coding
proc part_deauth {nick uhost hand chan} {
global homechan botnick
if { $hand == "*" } { return 0 }
if {([getuser $hand XTRA auth] == "0") || ([getuser $hand XTRA auth] == "DEAD")} {return 0}
setuser $hand XTRA AUTH 0
set tmphost "*![getuser $hand XTRA USERHOST]"
delhost $hand $tmphost
puthelp "PRIVMSG $homechan :[02Deauth02] - 02[02$nick!$uhost02]02 Parted All Deauthentication successfully"
putcmdlog "<<$nick>> ($uhost) !$hand! Temporary hostmask $tmphost removed."
save
}
}

Now what i am trying to do (and have noidea) is that i am trying to make the bot check to see if the person is still in one of the bots chan (so that it don't deauth them untill they have left all chans that the bot is in) I would love anyhelp that people can give me..

Thanx Adz
M
Misho

Post by Misho »

I'm not sure but try this:

proc part_deauth {nick uhost hand chan} {

global homechan

if { $hand == "*" } { return 0 }
if {([getuser $hand XTRA auth] == "0") || ([getuser $hand XTRA auth] == "DEAD")} {return 0}
set ostava 0
foreach kanal [channels] {
if {($kanal != $chan) && ([onchan $nick $kanal])} { set ostava 1 }
}
if {$ostava == 0} {
setuser $hand XTRA AUTH 0
set tmphost "*![getuser $hand XTRA USERHOST]"
delhost $hand $tmphost
puthelp "PRIVMSG $homechan :[02Deauth02] - 02[02$nick!$uhost02]02 Parted All Deauthentication successfully"
putcmdlog "<<$nick>> ($uhost) !$hand! Temporary hostmask $tmphost removed."
save
}
}
T
TriPpen^KiSs

Post by TriPpen^KiSs »

Thanx i stayed up working on it till 4am... All works now
T
TriPpen^KiSs

Post by TriPpen^KiSs »

Just another bug...

set adminlevel [getuser $nick XTRA ADMIN]
if {($adminlevel <= "200" && $adminlevel >= "500")} {
puthelp "PRIVMSG $homechan :[02Admin02] - $hand02[02$nick!$uhost02]02 $adminlevel Administrator"
}

I am trying to make the bot check the user file for the XTRA ADMIN level.. then check to see if it is not < 200 or > 500. then make to say the command... But it not working. Anyone help.

Kissmine
M
Misho

Post by Misho »

set adminlevel [getuser $nick XTRA ADMIN]
if {($adminlevel >= "200" && $adminlevel <= "500")} {
puthelp "PRIVMSG $homechan :[02Admin02] - $hand02[02$nick!$uhost02]02 $adminlevel Administrator"
}
T
TriPpen^KiSs

Post by TriPpen^KiSs »

I have made a script that adds a XTRA for when a person is suspend for the reason...

Eg. XTRA SUSPEND <reason>

Now i am after a command that when you unsuspend a person that it removed the XTRA from the userfile.. is there anyway to do it??

Thanx Kissmine
P
Petersen
Owner
Posts: 685
Joined: Thu Sep 27, 2001 8:00 pm
Location: Blackpool, UK

Post by Petersen »

iirc, setting its value to a null length string (ie "") should clear it.
Locked