mIRC Home    About    Download    Register    News    Help

Print Thread
Join channel without # #258724 19/08/16 05:45 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
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
}

Re: Join channel without # [Re: Deep3D] #258726 19/08/16 06:01 PM
Joined: May 2015
Posts: 249
splinny Offline
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!
Re: Join channel without # [Re: splinny] #258727 19/08/16 06:12 PM
Joined: Dec 2002
Posts: 477
Deep3D Offline OP
Fjord artisan
OP Offline
Fjord artisan
Joined: Dec 2002
Posts: 477
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.
Re: Join channel without # [Re: Deep3D] #258731 19/08/16 11:16 PM
Joined: Jan 2004
Posts: 1,282
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,282
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.
Re: Join channel without # [Re: Deep3D] #258737 20/08/16 04:52 PM
Joined: Aug 2016
Posts: 6
JoelBot Offline
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
---