Advertisement
illpastethat

Random Fact zzbooze

Feb 13th, 2013
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.24 KB | None | 0 0
  1. on *:text:.fact*:#:{
  2.   if ($($+(%,botflood.,$nick),2)) {
  3.     if ($($+(%,botflood.,$nick),2) >= 50) {
  4.       ignore -u60 $address($nick,2)
  5.       msg $chan $+($nick,$chr(44)) You have been put on ignore for 60secs for abusing the bot.
  6.       halt
  7.     }
  8.     elseif ($($+(%,botflood.,$nick),2) >= 40) {
  9.       msg $chan $+($nick,$chr(44)) Please do not flood the bot.
  10.       inc -z $+(%,botflood.,$nick) 20
  11.       halt
  12.     }
  13.     else {
  14.       inc -z $+(%,botflood.,$nick) 25
  15.     }
  16.   }
  17.   else {
  18.     inc -z $+(%,botflood.,$nick) 25
  19.   }
  20.   sockopen fact www.randomfunfacts.com 80
  21.   set %fact.chan $chan
  22. }
  23.  
  24. on *:sockopen:fact: {
  25.   if ($sockerr) {
  26.     echo -a * There was a problem connecting to the website. Please try again.
  27.     sockclose fact
  28.   }
  29.   else {
  30.     sockwrite -n $sockname GET / HTTP/1.0
  31.     sockwrite -n $sockname Host: www.randomfunfacts.com $+ $crlf $+ $crlf
  32.   }
  33. }
  34.  
  35. on *:sockread:fact: {
  36.   if ($sockerr) {
  37.     echo -a * There was a problem retrieving data from the website. Please try again.
  38.     sockclose fact
  39.   }
  40.   else {
  41.     sockread %fakt
  42.     if (<font face="Verdana" size="4"><strong><i> isin $remove(%fakt,$chr(9))) {
  43.       msg %fact.chan $remove($htmlfree(%fakt),&nbsp;)
  44.       unset %fact.chan
  45.     }
  46.   }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement