Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:text:.fact*:#:{
- if ($($+(%,botflood.,$nick),2)) {
- if ($($+(%,botflood.,$nick),2) >= 50) {
- ignore -u60 $address($nick,2)
- msg $chan $+($nick,$chr(44)) You have been put on ignore for 60secs for abusing the bot.
- halt
- }
- elseif ($($+(%,botflood.,$nick),2) >= 40) {
- msg $chan $+($nick,$chr(44)) Please do not flood the bot.
- inc -z $+(%,botflood.,$nick) 20
- halt
- }
- else {
- inc -z $+(%,botflood.,$nick) 25
- }
- }
- else {
- inc -z $+(%,botflood.,$nick) 25
- }
- sockopen fact www.randomfunfacts.com 80
- set %fact.chan $chan
- }
- on *:sockopen:fact: {
- if ($sockerr) {
- echo -a * There was a problem connecting to the website. Please try again.
- sockclose fact
- }
- else {
- sockwrite -n $sockname GET / HTTP/1.0
- sockwrite -n $sockname Host: www.randomfunfacts.com $+ $crlf $+ $crlf
- }
- }
- on *:sockread:fact: {
- if ($sockerr) {
- echo -a * There was a problem retrieving data from the website. Please try again.
- sockclose fact
- }
- else {
- sockread %fakt
- if (<font face="Verdana" size="4"><strong><i> isin $remove(%fakt,$chr(9))) {
- msg %fact.chan $remove($htmlfree(%fakt), )
- unset %fact.chan
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement