Difference between revisions of "Ison"

From Scriptwiki
Jump to: navigation, search
 
m (added stacking)
 
Line 1: Line 1:
Checks if a certain nick is online / in use.
+
Checks if a certain nick, or list of nicks, are online / in use.
  
  /ison <nick>
+
  /ison <nick> [nick2] [nickN]
  
The result is returned through [[Raw 303]] where [[$1-|$1]] will be your nick and [[$1-|$2]] will be the target nick if it exist, or nothing. See working example below.
+
The result is returned through [[Raw 303]] where [[$1-|$1]] will be your nick and [[$1-|$2-]] will be a list of the nicks you specified that are online, or nothing. See working example below.
  
 
== Example ==
 
== Example ==
Line 10: Line 10:
  
 
  raw 303:*:{
 
  raw 303:*:{
   if ($2) { echo -a $2 is online. }
+
   if ($2) { echo -a User(s) $2- are online. }
   else { echo -a The user is not online. }
+
   else { echo -a The user(s) specified are not online. }
 
   haltdef
 
   haltdef
 
  }
 
  }
  
 
[[Category:Basic IRC commands]]
 
[[Category:Basic IRC commands]]

Latest revision as of 10:38, 12 April 2006

Checks if a certain nick, or list of nicks, are online / in use.

/ison <nick> [nick2] [nickN]

The result is returned through Raw 303 where $1 will be your nick and $2- will be a list of the nicks you specified that are online, or nothing. See working example below.

Example

The following example will modify the returned output of an /ison request to a more user-friendly format.

raw 303:*:{
  if ($2) { echo -a User(s) $2- are online. }
  else { echo -a The user(s) specified are not online. }
  haltdef
}