mIRC Home    About    Download    Register    News    Help

Print Thread
if $nick == owner? #250367 11/01/15 07:31 PM
Joined: Apr 2014
Posts: 170
Bramzee Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Apr 2014
Posts: 170
Can't remember the bit that checks if the $nick is the owner of the channel... I looked in a few posts that I thought it was in, but haven't found it.

Re: if $nick == owner? [Re: Bramzee] #250368 11/01/15 08:36 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
I believe you're looking for
Code:
if ($nick == $mid(#,2-)) { do stuff }
Where
$nick = Nillen
$chan = #Nillen
$mid(#,2-) = Nillen


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: if $nick == owner? [Re: Bramzee] #250369 11/01/15 08:37 PM
Joined: Mar 2014
Posts: 215
J
judge2020 Offline
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
is it twitch?
if so, you just need to check if $nick == ownername, there's no owner identifier.

if it's an channel, you'd need to work with the network's channel bot


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Re: if $nick == owner? [Re: judge2020] #250371 12/01/15 02:50 AM
Joined: Feb 2003
Posts: 2,661
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,661
judge: aren't all channels named after their owner? Eg, if the channel #IHeartRacingGames exists, then the owner is always going to be IHeartRacingGames ?


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: if $nick == owner? [Re: Raccoon] #250399 13/01/15 04:48 AM
Joined: Jan 2014
Posts: 101
M
Majeye Offline
Vogon poet
Offline
Vogon poet
M
Joined: Jan 2014
Posts: 101
Originally Posted By: Raccoon
judge: aren't all channels named after their owner? Eg, if the channel #IHeartRacingGames exists, then the owner is always going to be IHeartRacingGames ?


This is correct, except that (and I'm not sure if this matters) Twitch puts the entire owner name in lowercase.

So the channel name could be #IHeartRacingGames, but the chan owner would be iheartracinggames

Re: if $nick == owner? [Re: Majeye] #250400 13/01/15 04:50 AM
Joined: Jun 2014
Posts: 248
B
Belhifet Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
channel names are case sensitive, so this is important. Fortunately this is particularly important because all nicks are lower case as well and then formatted after the fact.

Re: if $nick == owner? [Re: Belhifet] #250403 13/01/15 08:52 AM
Joined: Feb 2003
Posts: 2,661
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,661
Channel names are case sensitive on Twitch? I don't believe this is the case.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: if $nick == owner? [Re: Raccoon] #250415 13/01/15 04:19 PM
Joined: Dec 2013
Posts: 779
N
Nillen Offline
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
This is the case, #Nillens and #nillens are two different channels on twitch. If, as I have before when manually joining channels, you enter a channel with a capital letter, you won't be in the same room as the others as you'd expect to be.

Interesting fact however: If you're already in #nillens and attempt to join #Nillens, nothing will happen.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Re: if $nick == owner? [Re: Nillen] #250455 15/01/15 01:17 PM
Joined: Feb 2003
Posts: 2,661
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,661
You shouldn't worry about case sensitivity then, since there will never be a condition where the opposing-case channel is populated by real people from the website, and there should never be a desire to join the wrong one from IRC. So, simply match the name against its owner; case-insensitive.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!