Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON *:START: { server irc.twitch.tv:6667 }
- on *:TEXT:!commands:#: {
- if ((%floodcommands) || ($($+(%,floodcommands.,$nick),5))) { return }
- set -u15 %floodcommands On
- msg $chan $nick -> the current commands and their info for the bot can be found here http://bit.ly/PBBcommands $+
- }
- on *:text:hi:#: {
- if ((%floodhi) || ($($+(%,floodhi.,$nick),5))) { return }
- set -u10 %floodhi On
- set -u600 %floodhi. $+ $nick On
- msg $chan Welcome $nick to the livestream!
- }
- on *:text:hello:#: {
- if ((%floodhi) || ($($+(%,floodhi.,$nick),5))) { return }
- set -u10 %floodhi On
- set -u600 %floodhi. $+ $nick On
- msg $chan Welcome $nick to the livestream!
- }
- on *:text:hello!:#: {
- if ((%floodhi) || ($($+(%,floodhi.,$nick),5))) { return }
- set -u10 %floodhi On
- set -u600 %floodhi. $+ $nick On
- msg $chan Welcome $nick to the livestream!
- }
- on *:TEXT:hey mark:#: {
- if ((%floodhi) || ($($+(%,floodhi.,$nick),5))) { return }
- set -u10 %floodhi On
- set -u600 %floodhi. $+ $nick On
- msg $chan Welcome $nick to the livestream!
- }
- on *:TEXT:hi mark:#: {
- if ((%floodhi) || ($($+(%,floodhi.,$nick),5))) { return }
- set -u10 %floodhi On
- set -u600 %floodhi. $+ $nick On
- msg $chan Welcome $nick to the livestream!
- }
- on *:text:bye:#: {
- if ((%floodbye) || ($($+(%,floodbye.,$nick),5))) { return }
- set -u10 %floodbye On
- set -u600 %floodbye. $+ $nick On
- msg $chan We're sorry to see $nick go :(
- }
- on *:text:bye mark:#: {
- if ((%floodbye) || ($($+(%,floodbye.,$nick),5))) { return }
- set -u10 %floodbye On
- set -u600 %floodbye. $+ $nick On
- msg $chan We're sorry to see $nick go :(
- }
- on *:TEXT:!startlinks:#: {
- if ($nick isop #) {
- msg $chan Links will now play every 10 minutes
- .timerLinks 0 600 .play # C:\Users\hunter\Desktop\mirc\links\pblinks.txt
- }
- if ($read(reglist.txt,nw,$nick)) {
- msg $chan Links will now play every 10 minutes
- .timerLinks 0 600 .play # C:\Users\hunter\Desktop\mirc\links\pblinks.txt
- }
- }
- on *:TEXT:!stoplinks:#: {
- if ($nick isop #) {
- msg $chan Link cycle is now stopping.
- .timerLinks off
- }
- if ($read(reglist.txt,nw,$nick)) {
- msg $chan Link cycle is now stopping.
- .timerLinks off
- }
- }
- on *:TEXT:!newsub:#: {
- if ($nick isop #) {
- msg $chan pantherMc Welcome the new sub to the pather army! pantherMc
- }
- if ($nick == TheYoungerGamer ) {
- msg $chan pantherMc Welcome the new sub to the pather army! pantherMc
- }
- }
- on *:TEXT:!subonly:#: {
- if ($nick !isop #) {
- msg $chan entering subscriber-only chat
- msg $chan .subscribers
- }
- if ($nick == theyoungergamer ) {
- msg $chan entering subscriber-only chat
- msg $chan .subscribers
- }
- }
- on *:TEXT:!so:#: {
- if ($nick isop #) {
- msg $chan entering subscriber-only chat
- msg $chan .subscribers
- }
- if ($nick == theyoungergamer ) {
- msg $chan entering subscriber-only chat
- msg $chan .subscribers
- }
- }
- on *:TEXT:!subonlyoff:#: {
- if ($nick isop #) {
- msg $chan sub-only chat is now off
- msg $chan .subscribersoff
- }
- if ($nick == theyoungergamer ) {
- msg $chan sub-only chat is now off
- msg $chan .subscribersoff
- }
- }
- on *:TEXT:!sooff:#: {
- if ($nick !isop #) {
- msg $chan sub-only chat is now off
- msg $chan .subscribersoff
- }
- if ($nick == theyoungergamer ) {
- msg $chan sub-only chat is now off
- msg $chan .subscribersoff
- }
- }
- on *:TEXT:*just subscribed!:#:{
- if ($nick == twitchnotify ) {
- { msg $chan pantherMc Welcome $$1 to the panther army! pantherMc }
- write reglist.txt $$1
- { msg $chan $$1 has been granted link power! }
- }
- }
- on *:TEXT:!sreg add*:#: {
- if ($nick isop #) {
- write sreglist.txt $$3
- write reglist.txt $$3
- msg $chan $$3 has been added to the special regular list!
- }
- if ($nick == theyoungergamer ) {
- write sreglist.txt $$3
- write reglist.txt $$3
- msg $chan $$3 has been added to the special regular list!
- }
- }
- on *:TEXT:!sreg del*:#: {
- if ($nick isop #) {
- if ($read(sreglist.txt,nw,$3)) write -dl $+ $readn sreglist.txt
- msg # $$3 has been removed from the special regular list!
- }
- if ($nick == theyoungergamer ) {
- if ($read(sreglist.txt,nw,$3)) write -dl $+ $readn sreglist.txt
- msg # $$3 has been removed from the special regular list!
- }
- }
- on *:TEXT:!reg add*:#: {
- if ($nick isop #) {
- write reglist.txt $$3
- msg $chan $$3 has been added to the regular list!
- }
- if ($read(sreglist.txt,nw,$nick)) {
- write reglist.txt $$3
- msg $chan $$3 has been added to the regular list!
- }
- }
- on *:text:!reg is*:#: {
- if ($read(reglist.txt,nw,$3)) { msg $chan $$3 is on the regular list! }
- else { msg $chan $$3 is not on the regular list. }
- }
- on *:text:!sreg is*:#: {
- if ($read(sreglist.txt,nw,$3)) { msg $chan $$3 is on the special regular list! }
- else { msg $chan $$3 is not on the special regular list. }
- }
- on *:TEXT:!reg del*:#: {
- if ($nick isop #) {
- if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt
- msg # $$3 has been removed from the regular list!
- }
- if ($read(sreglist.txt,nw,$nick)) {
- if ($read(reglist.txt,nw,$3)) write -dl $+ $readn reglist.txt
- msg # $$3 has been removed from the regular list!
- }
- }
- on *:TEXT:!permit*:#: {
- if ($nick isop #) && ($2) {
- write reglist.txt $2
- msg # $2 has been permited to post a link for 20 seconds
- .timerRemovePermit 1 20 RemovePermit # $2
- }
- if ($read(sreglist.txt,nw,$nick)) && ($2) {
- write reglist.txt $2
- msg # $2 has been permited to post a link for 20 seconds
- .timerRemovePermit 1 20 RemovePermit # $2
- }
- }
- alias -l RemovePermit {
- write $+(-ds,$2) reglist.txt
- msg $1 $2 is no longer allowed to post a link
- }
- on *:text:!mods:#: {
- if (!%twitchmodlst.delay) {
- var %t = 1
- while (%t <= $nick(#,0,o)) {
- var %tmod = $iif(%tmod,%tmod $nick(#,%t,o),$nick(#,%t,o))
- inc %t
- }
- set -eu60 %twitchmodlst.delay 1
- msg # Mods Online: $iif(%tmod,%tmod,None)
- }
- }
- on *:text:*.com*:#:{
- if ($read(reglist.txt,nw,$nick)) return
- Msg # .timeout $nick 1
- Msg # Stop posting links!
- }
- on *:text:*www.*:#:{
- if ($read(reglist.txt,nw,$nick)) return
- Msg # .timeout $nick 1
- Msg # Stop posting links!
- }
- on *:text:*http*:#:{
- if ($read(reglist.txt,nw,$nick)) return
- Msg # .timeout $nick 1
- Msg # Stop posting links!
- }
- on *:text:*https*:#:{
- if ($read(reglist.txt,nw,$nick)) return
- Msg # .timeout $nick 1
- Msg # Stop posting links!
- }
- on *:text:*.info*:#:{
- if ($read(reglist.txt,nw,$nick)) return
- Msg # .timeout $nick 1
- Msg # Stop posting links!
- }
- on *:text:*.uk*:#:{
- if ($read(reglist.txt,nw,$nick)) return
- Msg # .timeout $nick 1
- Msg # Stop posting links!
- }
- on *:text:!*:#:{
- write commandslog.txt $nick $+ : $$1-
- }
- on *:TEXT:!paintball *:#: {
- if ($2 == mark_paintball) {
- var %mark = $rand(1,3)
- if (%mark == 1) { msg # $$2 slaughters $$3 in a paintball battle! }
- elseif (%mark == 2) { msg # $$3 has been shot between the eyes by $$2 $+ ! }
- elseif (%mark == 3) { msg # Paintball match! $$2 wins by a landslide against $$3 $+ ! }
- }
- else {
- var %others = $rand(1,6)
- if (%others == 1) { msg # $$2 slaughters $$3 in a paintball battle! }
- elseif (%others == 2) { msg # $$3 has been shot between the eyes by $$2 $+ ! }
- elseif (%others == 3) { msg # Paintball match! $$2 wins by a landslide against $$3 $+ ! }
- elseif (%others == 4) { msg # $$3 slaughters $$2 in a paintball battle! }
- elseif (%others == 5) { msg # $$2 has been shot between the eyes by $$3 $+ ! }
- elseif (%others == 6) { msg # Paintball match! $$3 wins by a landslide against $$2 $+ ! }
- }
- }
- ;
- ;other files i have loaded
- ;
- ;
- ;add commands
- ;
- on $*:text:/^!commandadd !?(\S+)/iS:#:{
- if ($read(sreglist.txt,nw,$nick)) {
- msg # Successfully created $regml(1) $+ !
- writeini allcommands.ini commands $regml(1) $$3-
- }
- }
- on $*:text:/^!commandremove !?(\S+)/iS:#:{
- if ($read(sreglist.txt,nw,$nick)) {
- msg # successfully removed command $regml(1) $+ !
- remini allcommands.ini commands $regml(1)
- }
- }
- on $*:text:/^!(\S+)/:#:{
- if ($readini(allcommands.ini,n,commands,$regml(1))) msg # $v1
- }
- alias safe return $!decode( $encode($1,m) ,m)
- ;
- ;a strawpoll and caps block script
- ;
- on *:text:!poll *:#:{
- if ($read(sreglist.txt,nw,$nick)) {
- var %regex = /(?:(.+?)\s*[:-]+\s*|())(.+?)$/iS
- if ($regex($strip($2-),%regex)) {
- var %title = $iif($regml(1),$v1,Poll)
- var %options = $regsubex($regml(2),/\s* $+ $chr(44) $+ \s*/g,$chr(44))
- }
- else return
- noop $strawpoll.create(#,%title,%options)
- }
- else { msg $chan you are not a Special regular. Ask a mod to !sreg add [name] }
- }
- alias strawpoll.create {
- var %chan = $1, %title = $urlencode($2), %options
- var %multi = true, %permissive = false
- var %i = 1, %n = $numtok($3,44)
- while (%i <= %n) {
- %options = %options $+ &options[]= $+ $urlencode($gettok($3,%i,44))
- inc %i
- }
- var %sockname = strawpoll. $+ $ticks
- hfree -w %sockname | hmake %sockname
- hadd %sockname headerfile %sockname $+ .header.txt
- hadd %sockname datafile %sockname $+ .data.txt
- hadd %sockname host strawpoll.me
- hadd %sockname request /ajax/new-poll
- hadd %sockname method POST
- hadd %sockname data $+(title=,%title,%options,&multi=,%multi,&permissive=,%permissive)
- hadd %sockname signal strawpoll.create
- hadd %sockname params %chan
- sockopen %sockname $hget(%sockname,host) 80
- }
- on *:signal:strawpoll.create:{
- var %err = $1, %sockname = $2, %header = $3, %data = $4, %chan = $5
- if (* 200 OK iswm $read(%header,1)) && ($regex($read(%data,n,1),(\d+))) {
- msg %chan http://strawpoll.me/ $+ $regml(1)
- }
- else msg %chan Could not create poll.
- hfree -w %sockname
- .remove %header | .remove %data
- }
- on *:sockopen:strawpoll.*:{
- var %a = sockwrite -n $sockname
- %a $hget($sockname,method) $hget($sockname,request) HTTP/1.0
- %a Host: $hget($sockname,host)
- %a Connection: close
- if ($hget($sockname,data) != $null) {
- %a Content-Type: application/x-www-form-urlencoded
- %a Content-Length: $len($v1)
- }
- %a $+($crlf,$hget($sockname,data))
- }
- on *:sockread:strawpoll.*:{
- var %header
- var %headerfile = $hget($sockname,headerfile)
- var %datafile = $hget($sockname,datafile)
- if (!$hget($sockname,header.complete)) {
- sockread %header
- while (%header != $null) {
- write %headerfile %header
- sockread %header
- }
- if ($sockbr) hadd $sockname header.complete $true
- }
- if ($hget($sockname,header.complete)) {
- sockread &read
- while ($sockbr) {
- bwrite %datafile -1 -1 &read
- sockread &read
- }
- }
- }
- on *:sockclose:strawpoll.*:{
- var %header = $hget($sockname,headerfile)
- var %data = $hget($sockname,datafile)
- var %signal = $hget($sockname,signal)
- var %params = $hget($sockname,params)
- if (%signal) .signal %signal 0 $sockname %header %data %params
- else {
- hfree -w $sockname
- .remove %header | .remove %data
- }
- }
- alias urlencode return $regsubex($1-,/([^A-Z0-9])/gi,$+(%,$base($asc(\1),10,16)))
- on !*:text:*:#:{
- if ($nick isop #) return
- if ($read(sreglist.txt,nw,$nick)) return
- if ( $len($1-) >= 10 ) {
- if ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 75 ) {
- ; check if user is not warned yet
- if !$istok(%caps.warned,$nick,32) {
- ; warning user
- msg $chan $nick -> stop typing in caps! [warning]
- ; add user to %caps.warned, so we can check it later
- set -e %caps.warned $addtok(%caps.warned,$nick,32)
- ; set timer to remove user from %caps.warned after 300s
- .timer 1 300 remove.warned $nick
- }
- else {
- ; so user is already warned..
- { msg $chan Caps again :( } { msg $chan .timeout $nick 60 }
- }
- }
- }
- }
- alias -l remove.warned {
- set -e %caps.warned $remtok(%caps.warned,$1,1,32)
- }
Add Comment
Please, Sign In to add comment