/go

By supergeo on Jul 27, 2005

Put this in your remotes. To open your remote section, press alt+r.

If you want to put this in your aliases section, remove ' alias ' before go.

Usage:

/go

You don't have to put a # before the channel. It will do this for you if you left it out. Just an improvement that can be added to scripts to make it easy for newer users to join channels, or used on it's own to make it a little bit easier.

alias go {
  if ($1 == $null) { echo -a You need to include a channel name. | halt }
  if ($chr(35) !isin $1-) { join $chr(35) $+ $1- | halt }
  join $1-
}

;Commented Version: 

 alias go {
  ;Checks to see if you specified a channel to join.
  ;If not, echo's that you need to include one. Halts script.
  if ($1 == $null) { echo -a You need to include a channel name. | halt }
  ;Checks to see if the # sign isn't in front of the name.
  ;If not, adds # sign and joins channel. Halts script.
  ;$chr(35) is the # sign.
  if ($chr(35) !isin $1-) { join $chr(35) $+ $1- | halt }
  ;If there is a channel specified, and there is a # sign in front,
  ;It does a regular join.
  join $1-
 }

Comments

Sign in to comment.
Yoinx   -  Aug 11, 2005

correction. This one echoes that you need to include a channel to join. Just in case you forget you need to specify that. ;p
However this alias will prevent you from using it to join local server channels that use the & prefix. ie. &help as oppose to #help. So not only is it pretty useless, in some cases it can be counter productive. /go &help would try to put you in #&help

 Respond  
QuickStep   -  Aug 11, 2005

i dont agree:
while reading sigh\'s comment, the script could be resized to:
alias go join #$$1-
Meaning it is actually exactly the same as the /j command in the aliases section, meaning you just rewrote the /j function, making it quite useless

 Respond  
QuickStep   -  Aug 01, 2005

thanks for the #$1 info sigh, didnt know that

 Respond  
Sigh_   -  Jul 30, 2005

Another thing to note is that a user may want to join a channel with a prefix other than #, such as &chan (local channels on most networks). $chantypes will return a list of supported chan prefixes

 Respond  
Sigh_   -  Jul 30, 2005

$1 will prefix $1 with # if it isn\'t already a channel name

 Respond  
cooolstar   -  Jul 29, 2005

salamz,
welcome. it is good idea but very old too

 Respond  
QuickStep   -  Jul 29, 2005

or you can just do
alias go join $+($iif(#* !iswm $$1,#),$1)
but its still not very usefull

 Respond  
DarthReven   -  Jul 28, 2005

you can also use \"if (#* iswm $1)\" but there really is no use for it

 Respond  
Corne   -  Jul 28, 2005

if ($left($1,1) == $chr(35)) would be better than if ($chr(35) !isin $1-)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.