mIRC Home    About    Download    Register    News    Help

Print Thread
How can I have commands work with this? #171292 22/02/07 11:51 AM
Joined: Feb 2007
Posts: 75
T
Trixar_za Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Is there a way I can get mIRC's commands and the server's commands to work without losing the functionality of the other? Is there also a way I can reduce all the on text and on action's? Seems redundent to use so many.

Code:
on *:INPUT:*:{ 
  if / isin $1- { if $1 == /me { .describe $active $2- | echo -tc $active 12* $me $2- | halt } 
    if : isin $1 { goto p1 | halt }
    else { .quote $remove($1-,/) | halt }
    haltdef
  } 
  :p1
  echo -tmc $nick 4[ $+ $me $+ 4] $1-
  .msg $active $1-
  haltdef
}
on ^*:TEXT:*:#:{
  var %channel = #
  echo -tlbf %channel 7[ $+ $nick $+ 7] $1-
  haltdef
}
on ^*:ACTION:*:#:{
  var %channel = #
  echo -tlbf %channel 12* $nick $1- 
  haltdef
}
on ^*:TEXT:*:?:{
  var %nickname = $nick
  echo -tlbf %nickname 7[ $+ $nick $+ 7] $1-
  haltdef
}
on ^*:ACTION:*:?:{
  var %nickname = $nick
  echo -tlbf %nickname 12* $nick $1- 
  haltdef
}
on ^*:CHAT:*:{
  var %chatin = $nick
  echo -tlbf = $+ %chatin 7[ $+ $nick $+ 7] $1-
  haltdef
}
on ^*:ACTION:*:=:{
  var %chatin = $nick
  echo -tlbf = $+ %chatin 12* $nick $1- 
  haltdef
}

Last edited by Trixar_za; 22/02/07 11:53 AM.

GigIRC Network Admin
irc.gigirc.com
Re: How can I have commands work with this? [Re: Trixar_za] #171297 22/02/07 02:15 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Well, you can do this:

Code:
on *:INPUT:*:{ 
  if ($left($1,1) == /) {
    if ($1 == /me) {
      .describe $active $2-
      echo -tc $active 12* $me $2-
    } 
    elseif (: isin $1) {
      echo -tmc $nick 4[ $+ $me $+ 4] $1-
      .msg $active $1-
    }
    else { .quote $remove($1-,/) }
    haltdef
  } 
}
on ^*:TEXT:*:*:{
  var %target = $iif($chan,$chan,$nick)
  echo -tlbf %target 7[ $+ $nick $+ 7] $1-
  haltdef
}
on ^*:ACTION:*:=:{
  echo -tlbf =$nick 12* $nick $1- 
  haltdef
}
on ^*:ACTION:*:*:{
  var %target = $iif($chan,$chan,$nick)
  echo -tlbf %target 12* $nick $1- 
  haltdef
}
on ^*:CHAT:*:{
  echo -tlbf =$nick 7[ $+ $nick $+ 7] $1-
  haltdef
}


Yes, I did adjust your on INPUT event so you weren't doing many things on a single line because I like reading it spread out. If you don't like that, you can use the pipes (|) again.


Invision Support
#Invision on irc.irchighway.net
Re: How can I have commands work with this? [Re: Riamus2] #171301 22/02/07 03:08 PM
Joined: Feb 2007
Posts: 75
T
Trixar_za Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Code:
on *:INPUT:*:{ 
  if ($left($1,1) == /) {
    if ($1 == /me) {
      .describe $active $2-
      echo -tc $active 12* $me $2-
    } 
    elseif (: isin $1) {
      echo -tmc $nick 4[ $+ $me $+ 4] $1-
      .msg $active $1-
    }
    else { .quote $remove($1-,/) }
    haltdef
  } 
}


Slight error in this part of the script, now the script only changes the <> around my nickname when : is in front of the text, I only added that in to ensure I can use the smiley smirk. Btw all I have access to now is server commands.

-- Sorry if the above sounded harsh, I have termanal foot in mouth disease, really need to learn to think about what I'm going to say instead of just typing smirk. Anyway Thanx to all that helped smile

Last edited by Trixar_za; 22/02/07 04:21 PM.

GigIRC Network Admin
irc.gigirc.com
Re: How can I have commands work with this? [Re: Trixar_za] #171320 22/02/07 09:45 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:INPUT:*:{ 
  if ($1 == /me) {
    .describe $active $2-
    echo -tc $active 12* $me $2-
  } 
  else { .quote $remove($1-,/) | haltdef }
  echo -tmc $nick 4[ $+ $me $+ 4] $1-
  .msg $active $1-
  haltdef
}


Well, I removed the first IF as it really isn't necessary. I'm not sure why you're removing /'s from text. Perhaps an explanation as to why you want to remove them would be helpful.

I also adjusted the : part as I misunderstood what you were after. This should handle that correctly now. If not, please give some examples showing what it currently does and what you want it to do instead.


Invision Support
#Invision on irc.irchighway.net
Re: How can I have commands work with this? [Re: Riamus2] #171365 23/02/07 09:31 AM
Joined: Feb 2007
Posts: 75
T
Trixar_za Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Generally to get the following effect:

[11:17am][Trixar_za] these*
[11:17am][Cheeky_Bratz] oh

Seems it is easy to do the one for the other chatters, but hard for oneself smirk

The reason I removed the / is to get access to (server) commands, which for some odd reason doesn't work when using this method to replace the < > around one's nickname. Only thing is I lost the mIRC commands like /msg. Is there any way I can check for mIRC commands without having to code them all in?


GigIRC Network Admin
irc.gigirc.com
Re: How can I have commands work with this? [Re: Trixar_za] #171378 23/02/07 02:19 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Ok, I had time to work with it. This seems to do what you need:

Code:
on *:INPUT:*:{ 
  if ($1 == /me) {
    .describe $active $2-
    echo -tc $active 12* $me $2-
    halt
  }
  elseif ($left($1-,1) == /) { return }
  echo -tmc $nick 4[ $+ $me $+ 4] $1-
  .msg $active $1-
  haltdef
}


Invision Support
#Invision on irc.irchighway.net
Re: How can I have commands work with this? [Re: Riamus2] #171390 23/02/07 08:06 PM
Joined: Feb 2007
Posts: 75
T
Trixar_za Offline OP
Babel fish
OP Offline
Babel fish
T
Joined: Feb 2007
Posts: 75
Just need a simple return and not a halt? lol. It's always something simple, isn't it? Odd, How I complicated it for myself :P

Anyway thank you Riamus2 for your all your help smile


GigIRC Network Admin
irc.gigirc.com
Re: How can I have commands work with this? [Re: Trixar_za] #171397 23/02/07 10:54 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Np. Sorry for the confusion. I wasn't able to test it until later, so I wasn't seeing the problem. smile


Invision Support
#Invision on irc.irchighway.net