mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
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

Joined: Jun 2015
Posts: 84
F
Babel fish
Offline
Babel fish
F
Joined: Jun 2015
Posts: 84
This is for Twitch, but I can hope it gives an idea.

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

Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
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?

Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
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




Joined: Jul 2015
Posts: 42
J
Ameglian cow
Offline
Ameglian cow
J
Joined: Jul 2015
Posts: 42
you need to close it } thats a place to start :P

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


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
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,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
What message you receive if the bot is banned?

Give the full message here.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
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,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
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 }



Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
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,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Because $nick was empty.


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2015
Posts: 36
N
Netct25 Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Dec 2015
Posts: 36
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