Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON *:TEXT:*:#: { ; by westor
- tokenize 32 $strip($1-)
- if ($1 == !pandora) {
- if ($nick !isop $chan) { .msg $chan ( $+ $nick $+ ): Error, You are not an channel moderator! | return }
- if ($2 == ON) {
- if (%pandora_ [ $+ [ $chan ] ]) { .msg $chan ( $+ $nick $+ ): Error, The Pandora Bot is already enabled for this channel! | return }
- else {
- set %pandora_ [ $+ [ $chan ] ] 1
- .msg $chan ( $+ $nick $+ ): You have enabled the Pandora Bot for this channel.
- }
- }
- if ($2 == OFF) {
- if (!%pandora_ [ $+ [ $chan ] ]) { .msg $chan ( $+ $nick $+ ): Error, The Pandora Bot is already disabled for this channel! | return }
- else {
- unset %pandora_ [ $+ [ $chan ] ]
- .msg $chan ( $+ $nick $+ ): You have disabled the Pandora Bot for this channel.
- }
- }
- }
- elseif ($1 !== !pandora) {
- if (!%pandora_ [ $+ [ $chan ] ]) { return }
- var %t = $ticks $+ $ctime
- sockopen alice. $+ %t www.pandorabots.com 80
- sockmark alice. $+ %t $mid($md5($address($chan,2)),16) $chan $regsubex($1-,/([^\w])/Sg,$+(%,$base($asc(\1),10,16,2)))
- }
- }
- on *:sockopen:alice.*:{
- tokenize 32 $sock($sockname).mark
- var %u $+(&botcust2=,$1&input=,$3)
- sockwrite -n $sockname POST /pandora/talk?botid=f5d922d97e345aa1&skin=custom_input HTTP/1.1
- sockwrite -n $sockname Host: www.pandorabots.com
- sockwrite -n $sockname Content-Type: application/x-www-form-urlencoded
- sockwrite -n $sockname Content-Length: $len(%u .)
- sockwrite -n $sockname $crlf %u
- }
- on *:sockread:alice.*:{
- if (!$sockerr) {
- var %s
- $event %s
- if $regex(%s,^.*<em>(.*?)<\/em><\/b>$) {
- .timer.AI. $+ $r(1,999) 1 7 msg $gettok($sock($sockname).mark,2,32) $regml(1)
- sockclose $sockname
- }
- }
- }
Add Comment
Please, Sign In to add comment