mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2014
Posts: 1
S
Mostly harmless
OP Offline
Mostly harmless
S
Joined: Dec 2014
Posts: 1
So I was wondering if there is a way to make a command display some information all the time, but if its activated on a specific channel, it would add on some extra information.

I'm trying to make a !commands command, that would display normal commands for my bot, then if its on a specific channel display some of the commands that only work on that channel

This is what I have done.

Code:
on *:TEXT:!commands:#:{ .msg $chan The commands for Gayfloro are: !rekt, !brad, !armory, and !prepare}
  if (#whatthehellshappened:) { .msg $chan The channel specific commands are: !timewaste, !stimewaste, !resettime, !resetbonk, !wastedtotal, !bonk, !sbonk, !totalbonk }
}

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
/help if then else
/help on text


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Nov 2014
Posts: 32
P
Ameglian cow
Offline
Ameglian cow
P
Joined: Nov 2014
Posts: 32
I'm learning too, but I think it would be something like:

Code:
on *:TEXT:!commands:#:{ 
  if ($chan == #whatthehellshappened) {
    .msg $chan The channel specific commands are: !timewaste, !stimewaste, !resettime, !resetbonk, !wastedtotal, !bonk, !sbonk, !totalbonk
  }
  else {
    .msg $chan The commands for Gayfloro are: !rekt, !brad, !armory, and !prepare
  }
}

Hope this helps a little

Panda

Joined: Nov 2014
Posts: 32
P
Ameglian cow
Offline
Ameglian cow
P
Joined: Nov 2014
Posts: 32
Hey, reading your post again, I don't think I actually gave you what you were asking for, specifically.

Here is what I think you're actually wanting to do (with comments this time :D)

Code:
on *:TEXT:!commands:#:{
  ;
  ; Stuff to do in addition to whichever of the if/else statement is executed
  ;
  .msg $chan The commands for Gayfloro are: !rekt, !brad, !armory, and !prepare
  if ($chan == #whatthehellshappened) {
    ;
    ; Stuff specific to the channel, #whatthehellshappened, would go below
    ;
    .msg $chan The channel specific commands are: !timewaste, !stimewaste, !resettime, !resetbonk, !wastedtotal, !bonk, !sbonk, !totalbonk
  }
  else {
    ;
    ; Stuff specific to any channel, when not #whatthehellshappened
    ;
    .msg $chan There are no channel specific commands for $chan
  }
}

Hope this is a little more helpful than the last answer I gave wink

Panda

Joined: Nov 2014
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Nov 2014
Posts: 149
Error post.

Last edited by JuanAm; 14/12/14 08:42 AM. Reason: Error post
Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Panda isn't asking any questions, he's trying to answer Sonfloro's question.
I think you misunderstood the previous post.


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Nov 2014
Posts: 149
J
Vogon poet
Offline
Vogon poet
J
Joined: Nov 2014
Posts: 149
Originally Posted By: Nillen
Panda isn't asking any questions, he's trying to answer Sonfloro's question.
I think you misunderstood the previous post.


Thank you Nillen, I edited my post blush


Link Copied to Clipboard