mIRC Home    About    Download    Register    News    Help

Print Thread
#258724 19/08/16 05:45 PM
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
Hello. I've made 2 scripts, they allow me to join channels without typing #. /j channel and /join channel.

What I've made works. But, is there a better way? And why is it better? I want to learn and understand. smile

For /j:
Code:
j {
  if ($chr(35) isin $1) { join $$1 $2 }
  else { join $chr(35) $+ $$1 $2- }
}


For /join:
Code:
raw 403:*:{
  if ($chr(35) !isin $1) { join $chr(35) $+ $2 | halt }
  echo.info There is no such channel as $2
  halt
}

Joined: May 2015
Posts: 249
Fjord artisan
Offline
Fjord artisan
Joined: May 2015
Posts: 249
iirc, there was a standard alias for it like "j #$$1-"


Dont give a fish - teach to fish!
Joined: Dec 2002
Posts: 483
Deep3D Offline OP
Pan-dimensional mouse
OP Offline
Pan-dimensional mouse
Joined: Dec 2002
Posts: 483
True, I don't need my /j-alias. It's to long and no need for it.

This is what I had from before. Why is there $$1 and $2-?
Why not just use $1- for the whole thing?
Code:
j join # $$1 $2-


But are there any other alternatives for the RAW?

Last edited by Deep3D; 19/08/16 06:14 PM.
Joined: Jan 2004
Posts: 1,358
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,358
It's important that the # be immediately before the $

Code:
/j /join #$$1 $2-


$$ halts the code if that token does not exist, I can't think of a reason $$1 $2- is used instead of $$1-

Last edited by Loki12583; 19/08/16 11:17 PM.
Joined: Aug 2016
Posts: 6
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Joined: Aug 2016
Posts: 6
Try this, but put in aliases!
Code:
/j /join $+(#,$2-)

Last edited by JoelBot; 20/08/16 04:56 PM.

---
Kind Regards,
JoelBot
---
Join me on irc.ctwug.za.net #jokers
---

Link Copied to Clipboard