mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2014
Posts: 2
H
HoHoes Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
H
Joined: Aug 2014
Posts: 2
So I want to be able to go to my bot's channel and type:
!join #[insert channel here]

then have the bot command join that channel

Same with leaving
!leave #[insert channel here]

Also OP only would be perfect in this scenario! laugh
Also while on this topic, is there anyway that my bot could respond or only activate the command when only I
type it.

Example:
<Myusername> !leavethischannel
bot proceeds to exit channel

Thanks Again smile


Be careful! I'm not HoHos!
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Code:
on *:text:!join &:#: {
join $lower($2)
}
Something like that.
Use the help files to further understand what it is you need to know to create what you're looking for.
/help if then else
/help on text


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Mar 2014
Posts: 215
J
Fjord artisan
Offline
Fjord artisan
J
Joined: Mar 2014
Posts: 215
something like this would be in your text event
Code:
join $chr(35) $+ $nick
you use $chr so it joins their channel #theirname if you use # $+ $nick then it will join #botnametheirname.


#imAbeginner
i made a chat bot for mark_paintball! http://twitch.tv/mark_paintball
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
That's not what was requested, that would join the channel #nillen in case I were to type it. He requested for it to be "!join nillen" instead, which requires the $2 identifier.
# will not refer to #botname unless the channel it is written in is the same as the botname either, it will simply return the channel name of the channel.
In this case, this would also be wrong. You can join a channel by typing /join nillen, which would make you join #nillen, however, if you have that in your script, and someone would join #nillen, it would turn out as ##nillen, which would be wrong.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net

Link Copied to Clipboard