Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- > a) make a particular channel or network/channel tab current;
- For this, you can use:
- set_context(nil, SERVER_NAME) #where SERVER_NAME is the name of the server tab, for example, FreeNode. Use find_context to get a specific context to use for this
- command('JOIN #channel_to_join')
- That will make the server tab you want the main focus, and then calling JOIN to a channel tab you already have open, will make the tab the main focus for the GUI.
- > b) send text (think self.puts for now) to a particular tab;
- To do this (assuming you mean to send text to the channel) you have two options:
- 1)
- command('SAY ${ text }')
- The limitation with this method, is that there is a limit to the length of text that you can send. The way to get past that, is to use number 2.
- 2)
- command('MSG ' + get_info('channel') + ' ' + text)
- This is still limited to the IRCd's text receive limit, but you are no longer restricted by the SAY's limitations.
- And to make these work correctly, you must use set_context as described in my first answer.
- > c) send text specifically to the/a server tab for a specific
- > network.
- To do this, just set_context(nil, server_name) like in the first example, and then use:
- command("COMMAND_NAME ARGS")
- For example,
- set_context(nil, 'freenode')
- command("MSG #channel Hello!")
- would send the message, 'Hello!' to the channel #channel, on the freenode server tab open in the client.
- Once again, I hope I have helped you :) and I don't regret it at all, I'm always happy to help. As usual, contact me with any further questions.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement