mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#245001 08/04/14 06:24 PM
Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I am making a Twitch chat bot and I can't seem to find a fully working Link block for all links?

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
That's funny, because there's a post in this section with that exact text.

Loki12583 #245003 08/04/14 06:56 PM
Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
probably about 5 with link block in it.

Here's my link block, it's not special but works
Code:
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!
}


the if command will read my allowed list [reglist.txt]
Here the code i use to add/delete my regulars:
Code:
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!
  }
}

and a permit command:
Code:
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
  }
}

those two are sreg because i only want special regulars to permit links or add regulars

Hope this helped.

Last edited by judge2020; 08/04/14 07:00 PM. Reason: fixed some stuff

#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
judge2020 #245004 08/04/14 06:58 PM
Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
So do I just Copy That above or under the Commands?

Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Also Do you have anything for spamming Symbols Like |?|??''#''/..'@:l;[;];'# Or not?

Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
Originally Posted By: AllDayGrinding
Also Do you have anything for spamming Symbols Like |?|??''#''/..'@:l;[;];'# Or not?

Not right now.

Originally Posted By: AllDayGrinding
So do I just Copy That above or under the Commands?

If you don't have a file set up, you can go ahead and use "!reg add [name]" in chat and your allowed people list is already.
Alternatively You can copy all of that, but change the file names to your allowed list (change every reglist.txt to yourfilename.txt)


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
judge2020 #245008 08/04/14 08:35 PM
Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I don't really understand this as I am Really new to making twitch bots I copied the Reg thing and it didnt do anthing http://gyazo.com/5ecbfa3b0cf72a282554c2b5e136fa21 http://gyazo.com/66dde907159d51ac6da06047aee2e227

Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
None of the text commands will work from the same server instance you're running the scripts on.

Loki12583 #245010 08/04/14 09:02 PM
Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
What? I dont understand

Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
lol ->

Last edited by judge2020; 08/04/14 09:03 PM. Reason: pic

#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
judge2020 #245013 08/04/14 09:05 PM
Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Can't you just post your Link block and add command stuff for your bot?

Last edited by AllDayGrinding; 08/04/14 09:06 PM.
judge2020 #245014 08/04/14 09:09 PM
Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Originally Posted By: judge2020
lol ->
That is me.

judge2020 #245016 08/04/14 09:19 PM
Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
Originally Posted By: judge2020
probably about 5 with link block in it.

Here's my link block, it's not special but works
Code:
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!
}


the if command will read my allowed list [reglist.txt]
Here the code i use to add/delete my regulars:
Code:
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!
  }
}

and a permit command:
Code:
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
  }
}

those two are sreg because i only want special regulars to permit links or add regulars

Hope this helped.


this is my link block


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
judge2020 #245017 08/04/14 09:21 PM
Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
So DO I just put that above the On:Text stuff and It will all work? or do I have to do something else

Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
yes,
Code:
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!
}

this will work, and ops will not be timed out (but will get the message)

Try adding a reg again, do you get a error message on the status window?


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
judge2020 #245028 09/04/14 07:55 AM
Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
I have this is and it is not working for me --> http://gyazo.com/3b1c10b6ebe6a46716f45d6d53182ac0

Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Do I have to put the Link block,Regular list and Permit in Remote or a different one? http://gyazo.com/5897549edb38791ce753583ab732ae5d

Joined: Mar 2014
Posts: 72
A
Babel fish
OP Offline
Babel fish
A
Joined: Mar 2014
Posts: 72
Everything works but when a mod or the Owner Post's a Link it still Says Stop Posting Links. Can you help me out with this?

Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
go into your mirc directory [C:\Users\ME\AppData\Roaming\mIRC] and see if there is a reglist.txt there. If not, make one and add their names manually [one name every line]
ex:
reglist.txt:
theyoungergamer
paintballbot
name1
name2


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
Code:
if ($nick(#,$nick,a,r)) return

Page 1 of 2 1 2

Link Copied to Clipboard