Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:!commands:#: {
- if ((%floodcommands) || ($($+(%,floodcommands.,$nick),2))) { return }
- set -u10 %floodcommands On
- set -u30 %floodcommands. $+ $nick On
- msg $chan $nick list of custom commands: 1. !donate - donation info 2. !directdonate - direct donation info 3. !rules - rules... duh! 4. !sunday - Sunday info 5. !mods - shows how many and who the mods are in chat 6. !twitter - twitter info 7. !youtube - youtube info
- }
- on *:TEXT:!modcommands:#: {
- if ((%floodmodcommands) || ($($+(%,floodmodcommands.,$nick),2))) {return}
- set -u10 %floodmodcommands on
- set -u30 %floodmodcommands. $+ $nick On
- msg $chan $nick list of moderator commands: 1. !poll - starts a straw poll 2. !startannounce - starts announcements 3. !stopannounce - stops announcements 4. !points add/remove x - adds or removes x ammount of points 5. !permit - permit a certain user to post links
- }
- on *:TEXT:!donate:#: {
- if ((%flooddonate) || ($($+(%,flooddonate.,$nick),2))) { return }
- set -u10 %flooddonate On
- set -u30 %flooddonate. $+ $nick On
- msg $chan $nick thanks for your interest in donating! Please follow the link to donate! It's very much appreciated! https://www.twitchalerts.com/donate/13mknight
- }
- on *:TEXT:!donatebc:#: {
- if ((%flooddonatebc) || ($($+(%,flooddonatebc.,$nick),2))) { return }
- set -u10 %flooddonatebc On
- set -u30 %flooddonatebc. $+ $nick On
- msg $chan $nick thanks for your interest in donating for Breast Cancer. You can type !donate for a link to donate to me to help support the channel. On sundays in october I donate 80% of everything donated to me to breast cancer research, or you can follow this link to donate directly to the cause! https://www.nationalbreastcancer.org/breast-cancer-donations
- }
- on *:TEXT:rules:#: {
- if ((%floodrules) || ($($+(%,floodrules.,$nick),2))) { return }
- set -u10 %floodrules On
- set -u30 %floodrules. $+ $nick Onmsg $chan $nick the rules here are simple so I expect everyone to follow them! - No spamming chat - No offensive language (be respectful) -Have Fun
- }
- on *:TEXT:!sunday:#: {
- if ((%floodsunday) || ($($+(%,floodsaunday.,$nick),2))) { return }
- set -u10 %floodsunday On
- set -u30 %floodsunday. $+ $nick On
- msg $chan $nick what are my Sunday Scare Streams for Breast Cancer you ask?? Well good question! Every Sunday in October I host a 4-6 hour live stream. 80% of all donations received during this time will be donated by me live toward breast cancer research and development. Alternatively you can just donate directly to the same foundation for breast cancer that I donate to! However, donating to me and letting me donate to them helps me out as I keep 20% to keep the streams going!
- }
- on *:TEXT:!twitter:#: {
- if ((%floodtwitter) || ($($+(%,floodtwitter.,$nick),2))) { return }
- set -u10 %floodtwitter On
- set -u30 %floodtwitter. $+ $nick On
- msg $chan $nick if you live what you see be sure to follow me on Twitter for stream times and upates! https://twitter.com/13mknight
- }
- on *:TEXT:!youtube:#: {
- if ((%floodyoutube) || ($($+(%,floodyoutube.,$nick),2))) { return }
- set -u10 %floodyoutube On
- set -u30 %floodyoutube. $+ $nick On
- msg $chan $nick if you like what I'm doing here please feel free to subscribe to my Youtube for past streams. Also if you miss a stream you can catch it there a few days later! https://www.youtube.com/user/The13mknight
- }
- on *:TEXT:hello:#: {
- if ((%floodhello) || ($($+(%,floodhello.,$nick),2))) { return }
- set -u10 %floodhello On
- set -u30 %floodhello. $+ $nick On
- msg $chan Hello $nick Thanks for joining us!
- }
- on *:TEXT:!startannounce:#: {
- if ($nick isop #) {
- msg $chan announcements are now running.
- .timerLinks 0 600 .play # C:\Users\Michael\Desktop\announcements.txt
- }
- }
- on *:TEXT:!stopannounce:#: {
- if ($nick isop #) {
- msg $chan announcements have now stopping.
- .timerLinks off
- }
- }
- on !*:text:*:#:{
- if ($nick isop #) { return }
- if ( $len($1-) >= 10 ) {
- if ( $calc($regex($1-,/[A-Z]/g) / $regex($1-,/[A-Z]/gi) * 100) >= 70 ) {
- ; 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..
- ; place your timeout command here
- }
- }
- }
- }
- alias -l remove.warned {
- set -e %caps.warned $remtok(%caps.warned,$1,1,32)
- }
- on *:text:!poll *:#:{
- 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)
- }
- 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:!blacklist add*:#: {
- if ($nick isop #) {
- set %blacklist. $+ $chan $addtok($($+(%,blacklist.,$chan),2), $3, 44)
- msg # $3 Has been added to my blacklist, anyone using $3 will be timed out for 10 minutes.
- }
- else {
- msg # Sorry $nick $+ , you do not have permission to add words to the blacklist
- }
- }
- on *:TEXT:!blacklist del*:#: {
- if ($nick isop #) {
- set %blacklist. $+ $chan $remtok($($+(%,blacklist.,$chan),2), $3, 44)
- msg # $3 Has been removed from the blacklist
- }
- else {
- msg # Sorry $nick $+ , you do not have permission to add words to the blacklist
- }
- }
- on *:TEXT:*:#: {
- if ($nick isop #) { return }
- var %i = 1
- while (%i <= $0) {
- if ($istok($($+(%,blacklist.,$chan),2), $gettok($1-,%i,32), 44) == $true) {
- msg # $nick -> Do not use Blacklisted Words. (Timeout)
- msg # .timeout $nick 600
- break
- }
- inc %i
- }
- }
- 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:!reg add*:#: {
- if ($nick isop #) {
- write reglist.txt $$3
- msg $chan $$3 has been added to the regular list!
- }
- if ($read(reglist.txt,nw,$nick)) {
- write reglist.txt $$3
- msg $chan $$3 has been added to the 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(reglist.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 addPoints {
- if ($1 !isnum) { echo 2 -st $1 is not a number. It needs to be a number. | halt }
- var %topic $+($chan,.,$nick)
- var %points $calc($readini(Points.ini,%topic,Points) + $1)
- writeini -n Points.ini %topic Points %points
- return %points
- }
- alias -l lookUpPoints {
- var %topic $+($chan,.,$nick)
- var %points $readini(Points.ini,%topic,Points)
- return %points
- }
- alias doaddpoints {
- if ($3 !isnum) { echo 2 -st $3 is not a number. It needs to be a number. | halt }
- var %topic $+($1,.,$2)
- var %points $calc($readini(Points.ini,%topic,Points) + $3)
- writeini -n Points.ini %topic Points %points
- echo -a Added points for %topic
- }
- alias dorempoints {
- var %topic $+($1,.,$2)
- remini -n Points.ini %topic Points
- echo -a Removed points for %topic
- }
- on *:text:!points:#:{
- if ((%floodpoints) || ($($+(%,floodpoints.,$nick),2))) { return }
- set -u10 %floodpoints On
- set -u30 %floodpoints. $+ $nick On
- msg # $nick has $readini(Points.ini,$+(#,.,$nick),Points) total points.
- }
- on $*:text:/!points (add|remove)/Si:#:{
- if ($nick isop #) {
- if ($0 < 3) { msg # Insufficient parameters: Use !points <add|remove> <user> [number] | return }
- writeini -n Points.ini $+(#,.,$3) Points $calc($readini(Points.ini,$+(#,.,$3),Points) $iif($2 == add,+,-) $iif($4 isnum,$4,1))
- { msg $chan $3 now has $readini(Points.ini,$+(#,.,$3),Points) total points. }
- }
- else { msg $chan This command is only available to moderators. }
- }
- on !*:join:#:{
- $+(.timerpoints.,#,.,$nick) 0 600 add.pts $+(#,.,$nick)
- add.pts $+(#,.,$nick)
- }
- on !*:part:#:$+(.timerpoints.,#,.,$nick) off
- alias -l add.pts {
- writeini -n Points.ini $1 Points $calc($readini(Points.ini,$1,Points) + 2)
- }
- on *:TEXT:!buyticket &:#:{
- if (%raffle == 1) {
- if ($2 > 10) {
- msg $chan Sorry $nick but you can only up to 10 tickets
- }
- if ($2 < 11) {
- var %i = 0
- var %ticket = $2
- var %topic = $+(#,.,$nick)
- var %user = $readini(Points.ini,%topic,Points)
- var %end = 10 * %ticket
- var %delete = %user - %end
- if (%delete > 0) {
- writeini -n Points.ini %topic Points %delete
- while (%i < %ticket) {
- write Raffle.txt $nick
- %i = %i + 1
- }
- msg $chan $nick you have bought %ticket tickets with %end points.
- }
- if (%delete < 0) {
- msg $chan Sorry $nick you don't have enough points to buy %ticket tickets!
- }
- }
- }
- if (%raffle == 0) {
- msg $chan Raffle is currently closed!
- }
- }
- on *:TEXT:!raffle open:#:{
- if ($nick isop #) {
- if (%raffle == 0) {
- msg $chan RAFFLE IS NOW OPEN!!
- set %raffle 1
- write -c Raffle.txt
- }
- }
- }
- on *:TEXT:!raffle close:#:{
- if ($nick isop #) {
- if (%raffle == 1) {
- msg $chan RAFFLE IS NOW CLOSED!!
- set %raffle 0
- write -c Raffle.txt
- }
- }
- }
- on *:TEXT:!roll:#:{
- if ($nick isop #) {
- if (%raffle == 1) {
- var %user = $read(Raffle.txt, n)
- msg $chan RAFFLE IS NOW BEING ROLLED, GOOD LUCK!!
- .timerOne 1 1 msg $chan /me 5!
- .timerTwo 1 2 msg $chan /me 4!
- .timerThree 1 3 msg $chan /me 3!
- .timerFour 1 4 msg $chan /me 2!
- .timerFive 1 5 msg $chan /me 1!
- .timerSix 1 6 msg $chan AND THE WINNER IS:
- .timerSeven 1 7 msg $chan %chat
- set %raffle 0
- write -c Raffle.txt
- }
- }
- }
Add Comment
Please, Sign In to add comment