mIRC Home    About    Download    Register    News    Help

Print Thread
#251713 01/03/15 01:30 AM
Joined: Apr 2014
Posts: 170
Bramzee Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Apr 2014
Posts: 170
Alright, so I'm looking for a way to make my bot ignore users that I feel shouldn't have the ability to use the bot (ie people who just spam a command and are annoying the hell out of myself and the rest of the chat)

I've tried doing the "ignore" straight from the nicklist (right clicking -> ignore) and that did nothing.

I've tried adding a command in so that it ignore's them on twitch itself
Code:
 msg # /ignore $2) 
and that also, did nothing.

And I've tried doing
Code:
 /ignore -u600 $address($2,0) 

again, with no results.

Any help is appreciated. Just don't understand why it's not working. Figured maybe someone on here might be able to shove me in the right direction.

Bramzee #251715 01/03/15 05:43 AM
Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
To send commands via twitch's IRC/TMI you need to instead prefix the command with "." instead of "/":

Code:
/msg # .ignore SomeUser


I am SReject
My Stuff
Joined: Apr 2014
Posts: 170
Bramzee Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Apr 2014
Posts: 170
Was pretty sure I tried that as well, but just to make sure I did it again. Still nothing. I can just add the user to an ini file I suppose and have an if statement. No clue why it won't work but it'll be alright.

Bramzee #251726 01/03/15 06:26 PM
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
What is it you're trying to accomplish with this ignore?
If it for some reason doesn't work on twitch, by adding nick!*@* to the ignore list, you can try scripting an ignore system yourself.

I'm not sure how the built-in /ignore system works, but I imagine that you can get same results by using
Code:
on ^*:text:*:#: {
if ($customignore($nick)) haltdef
}


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Nillen #251741 02/03/15 04:00 AM
Joined: Apr 2014
Posts: 170
Bramzee Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Apr 2014
Posts: 170
This is what I did, because I simply can't get "/ignore" to work. On twitch though, when you type "/ignore username" it ignores the person. For some reason however setting up a command to do !ignore* won't work with the bot messaging "/ignore $$2"

Bramzee #251742 02/03/15 05:00 AM
Joined: Sep 2014
Posts: 52
Babel fish
Offline
Babel fish
Joined: Sep 2014
Posts: 52
This is working for me on Twitch:
Code:
on *:text:!ignore *:#: {
  if ($nick !isop #) { return }
  ignore $2 $+ !*@*
  msg # $2 has been added to the ignore list.
}

on *:text:!unignore *:#: {
  if ($nick !isop #) { return }
  ignore -r $2 $+ !*@*
  msg # $2 has been removed from the ignore list.
}

Joined: Apr 2014
Posts: 170
Bramzee Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Apr 2014
Posts: 170
Thank you for this. So much.

Bramzee #251747 02/03/15 06:39 AM
Joined: Apr 2014
Posts: 170
Bramzee Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Apr 2014
Posts: 170
So, after working with this a bit... I've come to the conclusion that using the built in ignore is not a great idea. Simply because then all the link and spam protection scripts do not work. So here's what I have, figured I'd share in case anyone else was looking or might in the future... Thank you Nillen for the help earlier and for the help with the $mod as well a while back. Appreciate it. I figured this was what I was going to have to do in the first place, when I couldn't get it to work. But, I didn't think it all the way through and as anyone on twitch knows, blocking unwanted links is a MUST for a bot. Simply use

Code:
if ($blocked($nick,#))


at the beginning of any scripts you want to use this for to stop people from accessing your bot at all. Again, this was ALL Nillen. I just switched out some words and did some testing.

Code:
on @1:RAWMODE:#: { 
  if (($nick == jtv) && ($1 == +o)) writeini mods.ini # $2 1 
}
alias mod { 
  if ($readini(mods.ini,$2,$1)) return 1 
}

alias blocked {
  if ($readini(blocked.ini,$2,$1)) return 1
}

on *:text:!block*:#: {
  if ($mod($nick,#)) {
    writeini blocked.ini # $2 1
    msg # $2 has been added to the "blocked" list.
  }
  else return
}

on *:text:!unblock*:#: {
  if ($mod($nick,#)) {
    remini blocked.ini # $2
    msg # $2 has been removed from the "blocked" list.
  }
  else return
}


Link Copied to Clipboard