Farcrada commented on a Page, Need some help with a $read check/comparison   -  Sep 23, 2013
if ($1- isin $read(bans- $+ $chan $+ .txt,w, $1-))

That's not working seen as you (For some reason.) HAVE to use variables to make that work. Just like this one:

 echo # 14(00 $+ $time $+ 14) 10-11-15- 5min timeout on $nick

You also didn't define how long you want $nick to be timed out.

.msg $chan .timeout $nick |

In other words:

on 1:TEXT:*:#:{
  var %readbans bans- $+ $chan $+ .txt
  var %echotime 00 $+ $time $+ 14
  if ($1- isin $read(%readbans,w, $1-)) { .msg $chan .timeout $nick 10 | echo # 14(%echotime) 10-11-15- 5min timeout on $nick }
  elseif ($1 == !addban) {
    if ($2- == $read(%readbans,w, $2-)) { msg $chan banmask " $+ $2- $+ " is already added. }
    else { write %readbans $2- | msg $chan banmask " $+ $2- $+ " added. }
  }
  elseif ($1 == !delban) {
    if ($2- != $read(%readbans,w, $2-)) { msg $chan no such banmask " $+ $2- $+ ". }
    else { write -ds " $+ $2- $+ " %readbans | msg $chan banmask " $+ $2- $+ " deleted. }
  }
}

that ought to do the trick. Try it.

Menteroth  -  Sep 23, 2013

hello. thanks for the help. I will try this when I get the time and get back to you.
and for the timeout. I don't need to set time since the default is 5 minutes. this is a twitch.tv IRC-channel I'm using the script for. so that's fine. :)

and I don't need to change the !addban/!delban parts. they work as intended. I can add and remove several words banmasks.

Farcrada  -  Sep 23, 2013

You don't have to modify the !addban/!delban parts. This is just WAY easier when making modifycations. With some editing you could host this on multiple streams and once with just 1 script running. Don't get me wrong, but that's EXACTLY how Moobot, Nightbot Saucebot etc do their stuff. The have 1 script made to differ in options between streams. Now it's your tunr to figure out how and apply that. Then to become as famous as a bot like Moobot and Nightbot you'd have to pull some serious strings by some big-ass streams.

Menteroth  -  Sep 23, 2013

ah okay. then I understand. it probably won't be as big or nor do I really try for it. just fixing it for a small community channel which I stream on. I will try your correction later this evening if I get some time. thanks. :)

Menteroth  -  Oct 03, 2013

sorry for the late response. this doesn't work. the banmask doesn't trigger if it's in a text, only if it's said alone with no other text. commands still work as usual.

Sign in to comment

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.