mIRC Home    About    Download    Register    News    Help

Print Thread
#244327 16/02/14 07:35 AM
Joined: Feb 2014
Posts: 9
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Feb 2014
Posts: 9
I have made a bot with multiple forms of spam control like if the bot has typed more then 5 times in 10 seconds and for any specific command is entered it wont respond after 10 seconds and 30 seconds for that specific nick.

It would be nice to post why the bot does not respond to a public cloud document like google docs but I have been stumbling with the oath, maybe google docs is not the best medium to use.

Here is my current code saving what the bot does to a file:
Code:
ON *:TEXT:!drink:#: {
  var %BotDidThis = $date $time $nick typed !drink in #

  if ($read(NotAllowed $+ # $+ .txt,w,$nick)) { %BotDidThis = %BotDidThis But was stopped due to being banned. | write BotDidThis.txt %BotDidThis | return }
  if ((%flooddrink.drink = On) || (%flooddrink. $+ $nick = On) ) { %BotDidThis = %BotDidThis But was stoped due to flood Control. | write BotDidThis.txt %BotDidThis | return }
  if (%totalcommandsin10sec >= 5) { %BotDidThis = %BotDidThis But was stoped due to The bot typing 5 times within 10 seconds.  | write BotDidThis.txt %BotDidThis | return }

  set -u10 %flooddrink.drink  On
  set -u30 %flooddrink. $+ $nick On
  inc %totalcommandsin10sec
  timer $+ $nick $+ $time 1 10 dec %totalcommandsin10sec 
  var %drink = $read(Drinks.txt)
  msg # Gives $nick %drink
  %BotDidThis = %BotDidThis and Bot responded: Gives $nick %drink
  write BotDidThis.txt %BotDidThis
}


I have been trying to make an alias to write to using sockets so where I write to a file I can also call the alias to also write it to a cloud public document that is only viewable by others and editable by me, but keep getting access denied from not having the proper syntax oath. Thanks for your time and support.

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
I'd recommend installing google drive and then just editing the txt file locally.

Loki12583 #244333 16/02/14 04:11 PM
Joined: Feb 2014
Posts: 9
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Feb 2014
Posts: 9
Thanks that is a great idea saves me from doing the oath and sockets all together! Loki, you are smarter then Einstein!!! As always thanks for helping!

Joined: Feb 2014
Posts: 9
L
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Feb 2014
Posts: 9
For anyone that wanted this feature Google Drive is not the best as it will create a whole new TXT file on every update done by mirc.

I have found Dropbox works perfectly for this feature.


Link Copied to Clipboard