Advertisement
Guest User

Weechat Quickstart Guide

a guest
Jan 17th, 2013
1,654
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.06 KB | None | 0 0
  1. If you don't have weechat, you can download and install from the repositories of most major distros.
  2.  
  3. For Ubuntu:
  4. $ sudo apt-get install weechat-curses
  5.  
  6. For Fedora:
  7. $ su -c 'yum install weechat-curses'
  8.  
  9. Once installed you can run weechat by typing in a terminal:
  10. $ weechat-curses
  11.  
  12. Weechat uses your computer username as the default nick. If you don't want to connect to irc servers with your computers username, then in weechat type the following:
  13. /set irc.server_default.nicks "notmyhostname"
  14.  
  15. Setting nicks for individual server networks:
  16. /set irc.server.freenode.nicks "Your freenode registered nick or any nick you want."
  17.  
  18. If you want to make changes direcly to the irc.conf file, it's located at:
  19. /home/user/.weechat/irc.conf
  20.  
  21. To directly make changes to a particular setting in irc.conf you can open it in your favorite editor, nano, vi, emacs:
  22. $ sudo nano /home/user/.weechat/irc.conf
  23.  
  24. Save your changes, exit, then reload in weechat.
  25.  
  26. Or if you just want to look, pipe grep from cat:
  27. cat /home/user/.weechat/irc.conf | grep username
  28. Result:
  29. sasl_username = ""
  30. username = "freenodejunkie"
  31. freenode.sasl_username
  32. freenode.username
  33. freenode-tor.sasl_username = "freenodejunkie"
  34. freenode-tor.username
  35.  
  36. To enforce your new settings in your current weechat session type:
  37. /reload
  38.  
  39. This will reload from disk the configuration files changed with the weechat commands or with the editor. Each time you issue a set or add command you may need to use reload if you don't want to close and reopen weechat.
  40.  
  41. Listing the available irc servers you can connect to:
  42.  
  43. To show all servers:
  44. /server listfull
  45.  
  46. Example:
  47. [code]Server: freenode [not connected]
  48. addresses. . . . . . : 'chat.freenode.net/6667'
  49. proxy. . . . . . . . : ('')
  50. ipv6 . . . . . . . . : (off)
  51. ssl. . . . . . . . . : (off)
  52. ssl_cert . . . . . . : ('')
  53. ssl_priorities . . . : ('NORMAL')
  54. ssl_dhkey_size . . . : (2048)
  55. ssl_verify . . . . . : (on)
  56. password . . . . . . : (hidden)
  57. capabilities . . . . : ('')
  58. sasl_mechanism . . . : ('plain')
  59. sasl_username. . . . : ('')
  60. sasl_password. . . . : (hidden)
  61. autoconnect. . . . . : (off)
  62. autoreconnect. . . . : (on)
  63. autoreconnect_delay. : (10 seconds)
  64. nicks. . . . . . . . : ('ubuntu,ubuntu1,ubuntu2,ubuntu3,ubuntu4')
  65. username . . . . . . : ('ubuntu')
  66. realname . . . . . . : ('')
  67. local_hostname . . . : ('')
  68. command. . . . . . . : ('')
  69. command_delay. . . . : (0 seconds)
  70. autojoin . . . . . . : ('')
  71. autorejoin . . . . . : (off)
  72. autorejoin_delay . . : (30 seconds)
  73. connection_timeout . : (60 seconds)
  74. anti_flood_prio_high : (2 seconds)
  75. anti_flood_prio_low. : (2 seconds)
  76. away_check . . . . . : (0 minutes)
  77. away_check_max_nicks : (25)
  78. default_msg_part . . : ('WeeChat %v')
  79. default_msg_quit . . : ('WeeChat %v')
  80. [/code]
  81. As you can see above, connecting via secure ports is disabled with SSL (off)
  82.  
  83. If your server network isn't listed you can add it with the following:
  84. /server add 'a unique name identifier' 'the servers name address/port'
  85.  
  86. A few of the largest irc server networks as reported by http://searchirc.com/networks:
  87. irc.quakenet.org
  88. irc.ircnet.com
  89. irc.undernet.org
  90. irc.efnet.org
  91. irc.rizon.net
  92. irc.irc-hispano.es
  93. irc.dal.net
  94. irc.freenode.net
  95.  
  96. The unique name identifier helps reduce the amount of typing needed when connecting. Once a server has been added, reload, then you can connect easily:
  97. /connect oftc
  98.  
  99. Before you connect, you should know there are a few ways in which you can connect to irc:
  100.  
  101. Basic: non-secure plaintext, many servers provide this access on port 6667
  102. Secure: SSL encrypted traffic, secure ports can vary but a standard one is 6697.
  103. You should consult the irc servers web page to determine which ports they offer for SSL.
  104. TOR: This will encrypt your trafic and anonymize your ip.
  105. Connecting via TOR requires additional software downloads.
  106.  
  107. Basic connection:
  108.  
  109. If you already have a registered nick then you can identify your nick by adding a command:
  110. /set irc.server.freenode.command "/msg nickserv identify XXXX"
  111.  
  112. Where XXXX is your password for your registered nick. Just reload and connect. Having a freenode registered nick doesn't mean it can be used at other server networks, you will need to check with each server network their registered nick policy. If the Network provides NickServ then you can register a nick with them. Basically, the way it works is, you register your nickname with a password and an email address.
  113.  
  114. To register a nick with nickserv, if you don't want your current nick:
  115. /nick "new nick"
  116.  
  117. Then:
  118. /msg nickserv register PASSWORD EMAIL
  119.  
  120. You will have to reply to nickserv with the info provided in the valid email account. Don't forget your password, some server networks limit the number of registered nicks to a single email account.
  121.  
  122. If you don't have a registered nick, you can still connect:
  123. /server add dalnet irc.dalnet.net/6667
  124.  
  125. Freenode is already included by default, connecting to port 6667, just issue the connect command:
  126. /connect freenode
  127.  
  128. Secure connection:
  129.  
  130. Checking on a debian based system to see if you have ca-certificates installed:
  131. $ dpkg --get-selections | grep ca-certificate
  132. Result:
  133. ca-certificates install
  134.  
  135. Find where the ca-certificate.crt is located:
  136. $ sudo find / -name 'ca-certificates.crt'
  137. Result:
  138. /etc/ssl/certs/ca-certificates.crt
  139.  
  140. Since the certificates are installed and we know the location of the cert files, we can add them in weechat with the following command:
  141. /set weechat.network.gnutls_ca_file "/etc/ssl/certs/ca-certificates.crt"
  142.  
  143. Add your servers and the secure port:
  144. /set irc.server.freenode.addresses "chat.freenode.net/7000"
  145.  
  146. Enable SSL:
  147. /set irc.server.freenode.ssl on
  148.  
  149. Set the key size:
  150. /set irc.server.freenode.ssl_dhkey_size 1024
  151.  
  152. You may need to reload.
  153.  
  154. TOR connection:
  155.  
  156. In addition to SSL, Freenode servers support connections with TOR (https://www.torproject.org/), a network of virtual tunnels that allows people and groups to improve their privacy and security on the Internet. But before you try to connect via TOR, to connect to Freenode using TOR, SASL is required. Check other server networks for their TOR policies.
  157.  
  158. SASL is used to identify before on-join, and is a method that allows identification to services (NickServ) as the first step in connecting to the network, before anything else happens. To use SASL, one must register with services. If you already have a registered nick then you can proceed.
  159.  
  160. First we need to install TOR, for Debian based systems:
  161. $ sudo apt-get install tor
  162.  
  163. In WeeChat you need to create a socks5 proxy for TOR service (hostname/IP and port depend on your TOR configuration):
  164. /proxy add tor socks5 127.0.0.1 9050
  165.  
  166. Now, create a new server, for example:
  167. /server add freenode-tor p4fsi4ockecnea7l.onion
  168.  
  169. Set proxy for TOR:
  170. /set irc.server.freenode-tor.proxy "tor"
  171.  
  172. Set SASL authentication:
  173. /set irc.server.freenode-tor.sasl_mechanism dh-blowfish
  174. /set irc.server.freenode-tor.sasl_username "your_nickname"
  175. /set irc.server.freenode-tor.sasl_password "your_password"
  176.  
  177. And finally, connecting to the freenode server via TOR:
  178. /connect freenode-tor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement