PDA

View Full Version : Making a bot ...


[DarK]VIPER
01-08-2001, 23:03
Evenin' all..
I know how to make a bot which responds to certain things typed in a channel but now i wanna make a bot which you have to auth too via: /msg BOT auth <nick> <password>

Any ideas?

Cheers. Viper.

GameGuru
02-08-2001, 00:37
I suggest you read this thread (http://forums.wireplay.net/showthread.php?threadid=266210) as it gives ideas and sample code on making mIRC bots. If u have any further queries don't hesitate to post them here :)

(Gah, I sound like one of those tech support chaps :P)

[DarK]VIPER
02-08-2001, 01:55
hehe silly me :p tar for that..

Another thing though:

When a person auths, how do i make it add them: /guser 1000 ?

Then in remote I could put:

on 1000:text:!op ron:#:mode $chan +o ron

Thanks. viper.

Bad-Co
02-08-2001, 11:13
Velvet once gave me this link which explains eggdrops

http://www.egghelp.org/


its a good site and can teach you loads

[DarK]VIPER
02-08-2001, 19:34
eurh :/
don't wanna go into eggys to be honest ! would prefer just to know how to make it so that when someone auths they're set at a level (/guser 1000) ... Thanks though m8 ;)

Any suggestions grateful

Cheers, viper.

Krenom
03-08-2001, 17:02
I suggest you read this thread as it gives ideas and sample code on making mIRC bots. If u have any further queries don't hesitate to post them here :-)

^
|
|
my thread!! :-D (yay... i'm soo happy! ;-))

hmmm... ok.. spose i could actually say summin towards this thread! ;-)

when some1 creates an account with a bot.. u can (i think) set a user lvl (ur eg. of 1000) for that account! then it's just a matter of them logging in a they will already have it! of course i don't know how to do that even tho they sed in my thread.... but i'm happy with my simple bot! :-p

[DarK]VIPER
03-08-2001, 18:07
heh. well there must be a way..
any admins got any ideas?

when someone creates an account they are set to user level 1000...
how u go about doing that

help very much appreciated
viper

GameGuru
03-08-2001, 23:36
I'm looking into using addresses instead of nicknames for setting authing levels, give me some time and I'll hopefully have a script written up for you.

[DarK]VIPER
04-08-2001, 10:11
oh cheers m8..
once you've finished just post it up here n1 :)
then i'll be able to see how u done it, rip it apart, and fix it :p

cheers viper

wuaffiliate
05-08-2001, 05:02
the code to add people to my bot


on 1000:TEXT:adduser *:#:/guser 500 $$2 3 | /msg $$2 14Y15ou 14A15re 14N15ow 14M15y 14A15ssistant 14A15nd 14H15ave 14A15ccess 14T15o 14M15y 14C15ommands | /msg $$2 Type 14help for a list of my commands | msg $nick $$2 has been added as a User
on 1000:TEXT:remuser *:#:/ruser 500 $$2 3 | msg $nick $$2 has been removed as a User
on 1000:TEXT:addmaster *:#:/guser 1000 $$2 3 | /msg $$2 14Y15ou 14A15re 14N15ow 14M15y 14M15aster 14A15nd 14H15ave 14F15ull 14A15ccess 14T15o 14M15y 14C15ommands | /msg $$2 Type 14help for a list of my commands | msg $nick $$2 has been added as a Master
on 1000:TEXT:remmaster *:#:/ruser 1000 $$2 3 | msg $nick $$2 has been removed as a Master


i dont reallt want people to auth. i find no point in it. this is a really simple example and i can now say that i found a little but a few days ago and now my bot works 99.9% perfectly, for now :)

[DarK]VIPER
05-08-2001, 18:26
aye i know how to do that m8. its the performing of it when someone auths whihch i dont understand. however, i think GameGuru is making an ikle script whihc i wil be able to check for the code.
Ta for you input m8 :E
venom/viper

[Edit - *Slap* It's GameGuru :P]

[Edited by GameGuru on 05-08-2001 at 07:47 PM]

[DarK]VIPER
06-08-2001, 02:01
/runs and tells mum :-(

Just making sure m8, not hassaling or nothing..
Are you working on that script?
Dont wanna be waiting around for nout like :p

Cheers

vipz out

GameGuru
06-08-2001, 17:05
I'll get it done for some time early tommorow (probably around 1am) :)

GameGuru
07-08-2001, 01:06
Ok, I've Made some Very! Basic code for creating uselevels. When I tested it 5 minutes ago, everything seemed to work on it. However, I know there are some flaws in the code, but its up to you to get them sorted, I'd rather you did the bulk of the scripting :)

Anyway...


on *:LOAD: {
if ( $exists(userlist.txt) == $false ) { write userlist.txt This File Was Created on: $fulldate }
}
;example account creation and auth routine
;Syntax for making an account: /msg <nickname> mkacct <password>
;Your current nickname will become your auth name
on *:TEXT:mkacct*:?: {
if ( $2 == $null ) { msg $nick Error, you need to set a password to create an account }
elseif ( $read(userlist.txt, s, $nick ) != $null ) {
msg $nick Error, An account with that nickname exists, if it is yours use "/msg $me auth $nick <password>" to auth yourself
msg $nick Otherwise choose a different nickname
}
else {
write userlist.txt $nick $2 1
msg $nick account creation successful!
msg $nick Your Username is: $nick
msg $nick Your Password is: $2
}
}
;Syntax for authing with bot: /msg <nickname> auth username password
on *:TEXT:auth*:?: {
if (( $2 == $null ) || ( $3 == $null )) { msg $nick you forgot your username and/or password. Syntax: /msg $me auth username password }
else {
set %userauth $read(userlist.txt, s, $2 )
if ( $3 != $gettok(%userauth,1,32) ) { msg $nick Your password does not match the username specified, check both your password and username for mistakes and try again }
;The Following Checks the userlist.txt file for what user level a user is, if they are level 1 then it sets user level 2. If they are level 2 then it sets user level 3 etc...
elseif ( $3 == $gettok(%userauth,1,32) ) {
notice $nick Auth was successful
if ( $gettok(%userauth,2,32) == 1 ) { guser 2 $nick 1 }
elseif ( $gettok(%userauth,2,32) == 2 ) { guser 3 $nick 1 }
else ( $gettok(%userauth,2,32) == 3 ) { guser 4 $nick 1 }
}
else { msg $nick Your username does not exist, create an account first using "/msg $me mkacct password" }
}
}


Quick Explanation...

Once you auth successfully, the bot will check the third section in the text file which is a number (in my code it will be 1, 2, or 3. This can be the equivalent of standard user, Op, and Admin. Bear in mind this would only work on a one channel bot, and like I said before, has many flaws.

You still need to make it remove the userlevels when the user leaves IRC or the channel. It'll take me a bit longer to do code for that, if you need me to that is :)