when someone pms your bot it tells them that it is a bot and to contact the bot owner, it then relays their message to the bot owner, and then closes the query.
;****************************************
;Idea By Jordy Made With Help From Napa
;****************************************
on *:load:{ $owner }
alias owner { set %owner $$?="Please Set Bot Owner:" }
on *:open:?:*:{
.close -m $nick
if (!$($+(%,p2p.flood,$nick),2)) {
set -u10 $+(%,p2p.flood,$nick) on
.msg $nick 4 $+ $chr(7) Secure Query: If You Have Not Guessed I Am A Bot.
.msg $nick 4 $+ $chr(7) Secure Query: Please Contact My Owner %owner $+ .
.msg $nick 4 $+ $chr(7) Secure Query: Your Message Has Been Forwaded To My Owner.
.notice %owner 4 $+ $chr(7) $nick Requested A Secure Query Event With The Message: $1-
}
}
on *:load:{ $owner }
alias owner { set %owner.nick $$?="Please Set Bot Owner:" }
on *:connect: {
if (!%owner.address) {
if ($address(%owner.nick,1) != $null) {
set %owner.address $address(%owner.nick,1)
notice %owner.nick Hello! You are now recognized as my owner under the address: %owner.address
}
else {
echo -a No owner recognition!
set %owner.nick $$?="Please Set Bot Owner:"
}
}
}
What about this... Not sure if it works, but I think it's clear what I mean..
you could do this like this added the flood pro along with an alias to change name of owner.
on *:load:{ $owner }
alias owner { set %owner $$?="Please Set Bot Owner:" }
on *:open:?:*:{
.close -m $nick
if (!$($+(%,p2p.flood,$nick),2)) {
set -u10 $+(%,p2p.flood,$nick) on
.msg $nick 4 $+ $chr(7) Secure Query: If You Have Not Guessed I Am A Bot.
.msg $nick 4 $+ $chr(7) Secure Query: Please Contact My Owner %owner $+ .
.msg $nick 4 $+ $chr(7) Secure Query: Your Message Has Been Forwaded To My Owner.
.notice %owner 4 $+ $chr(7) $nick Requested A Secure Query Event With The Message: $1-
}
}
Quote:
maybe add something if the bot owner is not online/in the channel
if the bot is online, obviously the %botowner would be online..... and it sends the message to the bot owner anyway so if the %botowner wanted to then go and speak to that person he would do so...
not realy, my bots running now but i dont have my normal client open,
on our SAMP echo, we got abot running with that, but the guy who hosts it, doesnt keep his normal host on when he isnt there,
Same idea tho, every time they query you, you set a variable with the users host that will automatically unset itself in a given amount of seconds, say 3, then every time a query comes in you make sure there arent any variables matching that users host, if there aren't then you know its the first message or the time (3 sec) has passed so you allow it, if the variable does exist you know its a second msg within the 3 seconds so you can ignore it or make it so second message = warning and 3rd message = ignore or however you want.
Does that make enough sense?
no no, EL was saying, without your code loaded, that timer would be all u need to combat that kind of attack but with your code loaded, you would be flooded off the network without a chance in hell.
Look up flood pro for some examples or have a look at the trigger flood pro script i released for an idea, its at http://www.hawkee.com/snippet/4664/ .
Well jordy lil fella he isnt wrong its not secure if its ANYTHING its an exploit,put it this way kiddo if some one wanted to they could connect bots or just have a buncha friends ot just all out flood your sorry lil bot via timers and or while loops ( dont condone flooding ;p ) but they can do any of thse and trigger your lil auto message and close command now that said your bot is doin a few things #1 its sending 3 messages to the person that opened the query now after that it will then send a message to the bot owner now after that it closes the query window ,NOW think about it guy if just lets say 10 bots or say a timer 10 0 .msg bot lawlz was to happen thats 30 query messages sent and 10 notices to the unexpecting bot owner plus 20 window actions.Im guessing your lil bot will disconnect from the net work,and then you'll have one pissed off bot owner for bein flooded by his or her own bot.
NOW take this code out of his or her bot what do we have,0 query messages 0 notices and 0 window closes ,all you have is a buncha open query windows correct? then all you have to do is //close -m and they all go away.Rofl infact you could just ''/timer 0 60 close -m '' and be done with it.There explained ^_^'.`-.-´
so all i do is
.timer 0 60
and thats my flood protection...
Well jordy lil fella he isnt wrong its not secure if its ANYTHING its an exploit,put it this way kiddo if some one wanted to they could connect bots or just have a buncha friends ot just all out flood your sorry lil bot via timers and or while loops ( dont condone flooding ;p ) but they can do any of thse and trigger your lil auto message and close command now that said your bot is doin a few things #1 its sending 3 messages to the person that opened the query now after that it will then send a message to the bot owner now after that it closes the query window ,NOW think about it guy if just lets say 10 bots or say a timer 10 0 .msg bot lawlz was to happen thats 30 query messages sent and 10 notices to the unexpecting bot owner plus 20 window actions.Im guessing your lil bot will disconnect from the net work,and then you'll have one pissed off bot owner for bein flooded by his or her own bot.
NOW take this code out of his or her bot what do we have,0 query messages 0 notices and 0 window closes ,all you have is a buncha open query windows correct? then all you have to do is //close -m and they all go away.Rofl infact you could just ''/timer 0 60 close -m '' and be done with it.There explained ^_^'.`-.-´