mIRC Home    About    Download    Register    News    Help

Print Thread
N
Netct25
Netct25
N
Hi guys,

I was hoping to know if there is a way that I could make it to where if the bot detects that it is banned in the channel, it leaves the channel. Any help with this would be much appreciated.

Thanks,
Netct25

F
Fonic_Artes
Fonic_Artes
F
This is for Twitch, but I can hope it gives an idea.

Code:
on *:NOTICE:You are permanently banned*:#: {
/part #
}

N
Netct25
Netct25
N
Oh I see how this works. So it is listening for that specific message and if it seen, it will part the channel. Thanks so much for your help. So NOTICE is a function that is listening for messages?

N
Netct25
Netct25
N
This doesn't seem to work. Any ideas why? Here is what I have

Code:

 on *:NOTICE:You are permanently banned*:#: {
    .part $chr(35) $+ $nick




J
Joveice
Joveice
J
you need to close it } thats a place to start :P

Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Copy paste in the script editor (remotes tab) correctly the code above in order to work.

N
Netct25
Netct25
N
I have the brackets closed and the script is still not working. I have also placed it in the remotes file as well.

Last edited by Netct25; 07/02/16 07:06 PM.
Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
What message you receive if the bot is banned?

Give the full message here.

N
Netct25
Netct25
N
So I did some debugging. Did a simple echo back script to see if the function was working and it is. However it doesn't part the channel. I am confused. Any way here is the full message: -tmi.twitch:#channelnamehere You are permanently banned from talking in #channelnamehere


Code:

on *:NOTICE:You are permanently banned*:#: {
  .part $chr(35) $+ $nick
echo this works
}



Last edited by Netct25; 07/02/16 07:16 PM.
Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Thats because you did not copy paste correctly the first code that gave it to you.

Try use this:

Code:
on *:NOTICE:*You are permanently banned from talking in*:#: { .part $chan }


N
Netct25
Netct25
N
Yup that fixed it. Thank you Westor. Mind telling me why .part $chr(35) $+ $nick does not work in this case? Thanks again.

Joined: Dec 2008
Posts: 1,483
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,483
Because $nick was empty.

N
Netct25
Netct25
N
Oh that makes since! Since there was no stored data in the variable $nick it couldn't recognize which channel to part from so it did nothing.. Can't believe I didn't recognize this. Glad I have an extra eye to see what the issue was. Thanks Westor.


Link Copied to Clipboard