wsIrc

Access the global community

  • Increase font size
  • Default font size
  • Decrease font size
Home wsIRC Script Defined functions

Defined functions

E-mail Print PDF
Lists of available functions: Returns the user level (0-6).Returns the current user level (0-6).
Numeric functions
sin(a) Returns the sinus of angle a (in radiant).
cos(a) Returns the co-sinus of angle a (in radiant).
tan(a) Returns the tangent of angle a (in radiant).
abs(a) Returns the absolute value of a.
acos(a) Returns the arc co-sinus of angle a (in radiant).
asin(a) Returns the arc sinus of angle a (in radiant).
atan(a) Returns the arc tangant of angle a (in radiant).
ceil(a) Returns the sinus of angle a (in radiant).
pi() Returns the PI constant.
floor(a) Returns the lower integer value of a.
exp(a) Returns the exponential value of a.
log(a) Returns the logarithm of a.
sqrt(a) Returns the square root of a.
pow(a,b) Returns a power b.
min(a,b) Returns the smaller value between a and b.
max(a,b) Returns the greater value between a and b.
random() Returns a random number between 0 and 1.
round(a) Returns the rounded value of a.
User communication
alert(msg)
String functions
split(splitter,str) Splits the string into different pieces (separated by splitter) and returns it as an array.
trim(str) Removes all the spaces before and after the string.
lowercase(str) Returns the lower case equivalent.
uppercase(str) Returns the upper case equivalent.
find(str,tofind,[start])
substr(str,start,[length]) Returns the part of the string starting at "start" with an optional length. If length is not specified it will take until then end of the string.
len(str) Returns the length of the string.
replace(source,tofind,newstring) Returns a string after replacing "tofind" with "newstring".
Array functions
count(arr) Counts the number of elements of an array.
IRC functions
send_line(server,line) Sends a line to the IRC server to the current channel.
send_channel_line(server,channel,line) Sends a line to the specified IRC channel.
get_nick(server) Returns the actual user nickname for a given server.
get_channel(server) Returns the selected channel for a given server.
add_main_menu(label,command,confirm) Defines a menu (on the cog icon). The "command" function will be called with those parameters: (server, channel).
add_user_menu(label,command,confirm) Defines a menu on the online users context menu. The "command" function will be called with those parameters: (server, channel, nick).
close_window() Tries to close the window.
find_user_level(server,channel,nick)
find_current_level(server,channel)
cleanup_irc_markup(source) Returns a string without the IRC markups
escape(source) Returns an url encoded string
unescape(source) Decodes an url encoded string
Last Updated on Sunday, 28 February 2010 20:19