Hello!
Whenever I add an account it dissapears after I have disconnected/restart the mirc bot. I typed in the login command: */ctcp mybot login password*
(I did have an account on my bot) but the script is replaying that the system doesnt contain any user with that name.
* Patrik No such account
Weird, could anyone please help me with this error?
I still got two more questions left, Whenever I join the specific channel I want the loginsystem to run automatically (when I connect the bot and join the specific channel I need to type /loginconf in order to make it work and my question is: Is it possible to make it so it automatically starts after I have joined the
channel?
I also want the script to auto-op the users that login to the system..i.e typed in the right password and gets access granted to the channel..
(it would be a good idea if you try the script yourself, if you dont know what I mean)
alias loginconf {
if ($nick != $me) {
}
if ( $hget(Accts,Exists) != true ) {
hmake Accts
hadd Accts Exists true
echo $colour(info) -a * Login System has been successfully set up.
halt
}
if ( !$2 ) {
echo $coour(info) -a * SYNTAX: /loginconf <add|del|view> [account] [password]
halt
}
if ( $1 == view ) || ( $1 == info ) || ( $1 == pass ) {
if ( !$hget(Accts,$2) ) {
echo $colour(info) -a * $2 No such account
halt
}
echo $colour(info) -a * $2 $+ 's password is $hget(Accts,$2)
}
if ( $1 == add ) {
if ( !$3 ) {
echo $colour(info) -a * SYNTAX: /loginconf <add|del|view> [account] [password]
halt
}
hadd Accts $2 $3
echo $colour(info) -a * Added $2 to account list, password $3
}
elseif ( $1 == del ) || ( $1 == rem ) {
if ( !$hget(Accts,$2) ) {
echo $colour(info) -a * $2 no such account
halt
}
hdel Accts $2
echo $colour(info) -a * Removed $2 from account list
}
}
ctcp *:LOGIN: {
if ( $hget(Accts,Exists) != true ) {
msg $nick Login System has not yet been set up.
halt
}
if ( !$hget(Accts,$nick) ) {
msg $nick You do not have an account! only staff members on #SSL-Support will gain access to this channel.
halt
}
if ( !$2 ) {
msg $nick Syntax: LOGIN <password>
halt
}
if ( $2 != $hget(Accts,$nick) ) {
msg $nick Access denided, you typed in wrong password.
halt
}
if ( $nick !ison #SSL-Helpers ) {
msg $nick You must be on $v2 to log in!
halt
}
msg $nick Access granted, welcome to the SSL's supports staff channel.
timerkb. $+ $nick off
}
on *:JOIN:#SSL-Helpers: {
msg $nick $+ , You have 40 seconds to log in before being kickbanned. Just a reminder, use SYNTAX: /ctcp P login *YourPassWordHere*
timerkb. $+ $nick 1 40 ban -ku300 $chan $nick Access denied, either you typed in wrong password, your not recognized or you dont have an account. For your information: I only recognize the certain nick that is in my database, if you changed your nick and after that tryed to login then that's why you got banned. If you got banned for using an unrecognized nick please type Syntax: /cs unban #SSL-Support or if you typed in wrong password.
}
on *:START: {
hload Accts Accts.dat
}
on *:EXIT: {
hsave Accts Accts.dat
}