Command Profiles were implemented as a temporary solution for connecting to servers, joining channels, etc., in an automated fashion. Their current implementation allows one to perform any sequence of any commands supported by ~HydraIRC either by the client itself when it starts, connects to a server, joins a channel, or by manually executing them with a command from the input line.

To create a command profile, navigate to Options, Prefs, Scripts, choose the name for it (it is case in-sensitive and can contain spaces), and add the commands you want in the order you want them to be executed keeping one command per line.

Note: in later versions Command Profiles are sometimes referred to as Scripts (as for seen in Options, Prefs tree control, for example) - they are the same thing and both terms can be used interchangeably.


Here is an example of what a command profile may look like. Let's call it MyConnect:

/server irc.efnet.net — /newserver irc.nullus.net — /newserver irc.undernet.org

To execute it, use /exec command in the input line:

/exec myconnect

~HydraIRC will execute the commands line by line and will connect to three different servers.


There are three specially named profiles: OnStartUp, OnLoggedIn, and OnJoin - if created, they will be executed by the client automatically. Look into each profile for more details on how to use them.


A handy side effect to the original purpose of Command Profiles is that one can create small “scripts”, more like macros. Here are some examples provided by the users.

Example 1) by ~JiMmyij:

A script to do some things while I am planning to go away for some time. It pushes a msg on the current channel I'm currently having in focus (not all chans that I have joined), and changes my nick, so others can see that I'm away. Follow these steps:

  1. in the Command Profiles add an entry called 'away'
  2. as commands to perform set these: — /me is going away now, don't get disappointed totally, he's coming back one day/nick jimmyij|away
  3. press OK and your ready to go.
  4. use it by typing /exec away command at the input line

Example 2) by ~JiMmyij:

A macro to set me back, change my nick, identify, and ask oper from the opersrv

  1. make a profile called 'back'.
  2. set these as to perfrom: — elvis enters the building after a long day in space…/nick jimmyij/identify mynickservpass/oper jimmyij myolinepass
  3. press OK and use /exec back command at the input line


Tip: do not use carriage return at the end of the last line in any command profiles (in other words, avoid having empty lines at the end) - they seem to cause erratic problems sometimes.

Note: as stated above, Command Profiles are just temporary fix that happened to be handy. No new (big) features are planned to expand their current capabilities. Ultimately, they will be replaced by scripting or by some other more powerful automation facility in the future. —

commandprofiles.txt · Last modified: 2010/04/03 01:34 (external edit)
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki