[16:56] <Myrtti> just testing everything works :-P
[18:03] <Myrtti> if you're planning to attend todays "IRC and irssi basics for Ubuntu IRC ops", please poke me in pm or email if you are planning to attend so I can set up channel flags beforehand in the sandpit channel so that you can actually play and try out the commands and we don't need to waste our time on waiting for me to give everyone who plans to attend the flags then. Thank you!
[18:54] <itmannen> Myrtti<<  I have sent you a mail
[19:04] <Myrtti> itmannen: noted and acted on
[19:05] <itmannen> Myrtti<<  Very good :)
[19:06] <itmannen> Myrtti<<  What time ? Tonight ?
[19:06] <Myrtti> 54 minutes
[19:06] <itmannen> Ok. Thanks
[19:07] <pmatulis> darn, forgot about the time change
[19:07] <pmatulis> -4 now
[19:07] <ubuntu-uhri> @now UTC
[19:07] <meetingology> ubuntu-uhri: Error: "now" is not a valid command.
[19:07] <Myrtti> boo.
[19:08] <Myrtti> anyway, ubottu has it.
[19:08] <dax> You don't all have your IRC clients in UTC? How do you survive?
[19:09] <pmatulis> that's a very good idea
[19:09] <Fuchs> being able to do simple math without any tools
[19:09] <Fuchs> I know you are unable to do that, dax :)
[19:09] <Myrtti> UTC is timestamp -2 :-P
[19:09] <Myrtti> it's not rocket science
[19:10] <Fuchs> dax: also, if you would use a better DE, you would have a nice mouse hover on the clock which gives you UTC :>
[19:11] <dax> Myrtti: daylight savings time
[19:11] <dax> Fuchs: This way, I have both on-screen at once
[19:11] <dax> Myrtti: also, this way my logs don't randomly jump back an hour
[19:12] <Myrtti> I'm a slave of my habits
[19:12] <Myrtti> sorry :-P
[19:12] <dax> unacceptable, dissent is not allowed, all users must conform to my irssi settings
[19:13] <Fuchs> hahahahaha
[19:13] <Fuchs> no.
[19:44] <Myrtti> if you're planning to attend todays "IRC and irssi basics for Ubuntu IRC ops" in fifteen or so minutes, please poke me in pm or email if you are planning to attend so I can set up channel flags beforehand in the sandpit channel so that you can actually play and try out the commands and we don't need to waste our time on waiting for me to give everyone who plans to attend the flags then. Thank you!
[19:55] <AlanBell> evening
[19:56] <itmannen> 5 min left ?
[19:56] <Myrtti> approximately yes.
[19:56] <itmannen> Ok
[19:57] <Rcart> please join #ubuntu-classroom-chat for comments (:
[19:57] <itmannen> Ok
[19:58] <Myrtti> if you've got nickserv account, now is the time to identify
[19:58] <Myrtti> if you don't now is the time to register
[19:59] <Myrtti> if you don't want to, that's ok, but a bit more messy
[19:59] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2012/03/12/%23ubuntu-classroom.html following the conclusion of the session.
[20:00] <Myrtti> alright then
[20:01] <Myrtti> There will be times when I'll be inviting questions, but feel free to ask any time if you need help. You can ask your question either on this channel, or in #ubuntu-classroom-chat.
[20:01] <Myrtti> If you've not yet msg'd me with the NICKSERV accountname you're using, or asked to have a hostmask added to our sandpit channel, now is the time to do it, so we can get you all set.
[20:02] <Myrtti> Also, if you notice a mistake in what I'm teaching to others or you have a suggestion on how to do things better, feel free to ask!
[20:03] <Myrtti> hi, I'm Myrtti, or Miia Ranta, and I've been an IRC addict since 1996. I started using IRC with mIRC in IRCnet, and have gradually moved up in the networks and ranks and am currently op in many Ubuntu IRC channels, and member of freenode staff.
[20:03] <Myrtti> We will expand this class into how to do all the dirty work quickly and easily with irssi and tmux so if you're planning to do that, you can first start tmux, and then start irssi inside it.
[20:03] <Myrtti> If you're planning to you some other client, like XChat, connect to freenode with the GUI tools, or wait a few minutes and I'll show how you can connect with the commands. I'll come back to how you can autoidentify to NickServ later on. I know many people like to use pidgin or other clients for IRC, but things are considerably easier if you use either irssi or XChat. Bitlbee can help you in the conversion from Pidgin/Empathy to a ...
[20:03] <Myrtti> ... proper IRC client, and you can ask about it later on, I can help with it a bit and I'm sure there's plenty of others who can help with it better than I can.
[20:06] <Myrtti> So let's start with the lesson!
[20:06] <Myrtti> Once you have started irssi (with or without screen or tmux), you can set your nickname with
[20:06] <Myrtti> /set nick yournickname
[20:06] <Myrtti> alternate nick with
[20:07] <Myrtti> /set alternate_nick youralternate
[20:07] <Myrtti> and your real name with
[20:07] <Myrtti> /set real_name Your Name
[20:07] <Myrtti> you can save the changes you've done to a config file by issuing
[20:07] <Myrtti> /save
[20:07] <Myrtti> just to get you going quickly connected into freenode either with irssi or XChat, type
[20:08] <Myrtti> /connect irc.freenode.net
[20:08] <Myrtti> most clients accept and use /server irc.freenode.net
[20:08] <Myrtti> if you chose to use a nickname you already own, you can identify with
[20:08] <Myrtti> /msg nickserv identify accountname password
[20:09] <Myrtti> I'll return to other NickServ commands later on. I'm not going to tell you how to register your nickname on freenode as you probably have done it already.
[20:09] <Myrtti> You can now join channels with /join, in irssi you can issue multiple channels in one command, separating the channel names with commas. If the channel has a passkey, it is easier to enter that channel on it's own join command.
[20:10] <Myrtti> /join #ubuntu,#ubuntu-sandpit,#ubuntu-classroom
[20:11] <Myrtti> in case you missed it, the sandpit channel where you will be able to play is #ubuntu-sandpit.
[20:12] <Myrtti> please wait before starting to kickban people, as fun as it may be it isn't yet time for it :-)
[20:12] <Myrtti> you can leave one or more channels in a similar way that you joined, and you enter a message too
[20:12] <Myrtti> /part #ubuntu,#ubuntu-sandpit,#ubuntu-classroom so long and thanks for all the fish
[20:13] <Myrtti> ubuntu-uhri will demonstrate
[20:13] <Myrtti> and quit your client, including a quit message
[20:13] <Myrtti> /quit farewell cruel world
[20:14] <Myrtti> for more help, you can either ask me or use the inbuilt help command
[20:14] <Myrtti> /help
[20:14] <Myrtti> You can swap between windows using Meta (Alt or Esc) combined with 1, 2, 3, 4 etc, followed by q, w, e, r etc for window numbers beyond 10. You can scroll the text with page up and page down.
[20:14] <Myrtti> fortunately I have no experience on AZERTY keyboards :-P
[20:15] <Myrtti> Private messages can be started with
[20:15] <Myrtti> /query nick
[20:15] <Myrtti> or
[20:15] <Myrtti> /msg nick message
[20:15] <Myrtti> any questions so far?
[20:15] <itmannen> No
[20:15] <dax> If you are using another keyboard layout, there are scripts for some to change irssi's keybindings for windows. See for example http://scripts.irssi.org/html/keybinds.pl.html for azerty
[20:15] <Sidewinder1> Nah, you're doin' a great job!
[20:16] <Myrtti> thank you dax ♥
[20:16] <Myrtti> Now that we've got IRC basics covered, let's go to op basics. Before we start the actual business, some philosophical reminders about the job.
[20:16] <Myrtti> Escalation and catalysing are important things to remember. Person who breaks the guidelines should be warned first, and from there on the actions should be slowly be escalated if no reasonable result isn't achieved. Usually the route goes by *warning* -> *mute* -> *remove* -> *removeban*.
[20:17] <Myrtti> Freenode philosophy has an excellent essay about catalyzing, I wholeheartedly suggest everyone should read it. http://freenode.net/catalysts.shtml
[20:17] <Myrtti> and before someone of my staff colleagues slaps me on the fingers, I take the blame for mistyping freenode with a capital f.
[20:18] <Myrtti> mea culpa.
[20:18] <Myrtti> The main point to be remembered is that mute/remove/ban isn't supposed to be considered a punishment, but rather a way of preventing more harm done. It should be possible for every single ban to be negotiated and resolved, if not by an op, then by the escalation process.
[20:19] <Myrtti> Remember: Everything that applies for normal user applies for supporter https://wiki.ubuntu.com/IrcGuidelines. Everything that applies for supporter of the channels applies for you https://wiki.ubuntu.com/IRC/SupportersGuide.
[20:19] <Myrtti> And most of all, both the normal and Leadership Code of Conduct applies to you the operator as well. http://www.ubuntu.com/project/about-ubuntu/conduct and http://www.ubuntu.com/project/about-ubuntu/leadership-conduct. Behave accordingly. This session will not go into depth with these documents, so we'll move on to the actual training part.
[20:20] <Myrtti> Just a reminder, if you're not yet in the sandpit channel, you can join with issuing /join #ubuntu-sandpit
[20:20] <Myrtti> please msg me your nickserv accountname if you want to play :-)
[20:21] <Myrtti> as mentioned by dax in -chat, https://wiki.ubuntu.com/IRC/IrcTeam/OperatorGuidelines is also relevant in the context of being an Ubuntu op.
[20:21] <itmannen> Myrtti<<  itmannen
[20:22] <Myrtti> so, any questions so far? itmannen?
[20:23] <itmannen> No. I understand what you type so far
[20:23] <bkerensa> :)
[20:23] <Myrtti> no?
[20:23] <Myrtti> let's continue then.
[20:24] <Myrtti> As per freenode recommendations, the IRC team has advised to op up (and stay opped) only when needed. This encourages users to not to ask for support specifically from the ops (in PM or publicly) and atleast in theory will facilitate non-op users to catalyse situations equally to the actual ops, creating a more equal atmosphere.
[20:25] <Myrtti> At the end of the lesson I will give a few aliases on how to automate opping up/down for certain commands. There are also scripts that will do the same functionality. About those later on. Now for the actual commands. You can now op up on the sandpit channel
[20:25] <Myrtti> /msg chanserv op #ubuntu-sandpit nickname
[20:26] <Myrtti> if you're not able to, the flags aren't set to allow you to do so.
[20:27] <Myrtti> anyone having trouble?
[20:27] <Sidewinder1> Yes!
[20:28] <Sidewinder1> X_Chat..
[20:28] <Myrtti> Sidewinder1: try now?
[20:29] <Sidewinder1> K
[20:29] <Sidewinder1> #ubuntu-sandpit :You're not a channel operator
[20:29] <Sidewinder1> -
[20:30] <Myrtti> now you are - I opped you - let's move on
[20:30] <Sidewinder1> Thanks.
[20:31] <Myrtti> Let's follow the escalation route and start with mute. Mute is a way to prevent users from sending to channel and/or others from seeing the text they send. Mute can be set with
[20:31] <Myrtti> /mode +q nickname*!*@*
[20:31] <Myrtti> you can use ubuntu-uhri as a helpless victim for your practice
[20:32] <itmannen> #ubuntu-classroom :You're not a channel operator
[20:33] <Myrtti> /msg chanserv op #ubuntu-sandpit nickname
[20:33] <Myrtti> you should be able to
[20:33] <itmannen>  /msg chanserv op #ubuntu-sandpit itmannen
[20:33] <Myrtti> This prevents the user from sending messages to the channel. If the channelmodes include +z, then people opped can see what the muted say. We will return on what all the bits are on the command we used later on when we discuss bans more.
[20:34] <Myrtti> Some of you may be familiar with /kick - in Ubuntu IRC channels we usually use remove command. Some IRC clients, like irssi, don't include this command at all, and so you have to give it as a direct command to the server with /quote. Thus, instead of /kick we use /quote remove.
[20:34] <Myrtti> Remove is used for few reasons, the most important one being that usually IRC clients do not include so-called "autorejoin on kick"-functionality. As the old proverb of the jungle says: "Kick is not an invite" - If we've decided to remove you from the channel for one reason or another, it is unlikely that things change in the split second you've rejoined.
[20:35] <Myrtti> Combined with a kick or remove, ban is the next up tool. Bans are set up just like quiets are, but as ban is available in all networks, users know how to bypass it by changing their nicknames and rejoining the channel. This is known as banevasion, and it's bad enough to be prohibited by freenode TOS.
[20:36] <Myrtti> If a banevader is cloaked and is persistant enough in evasion, freenode may revoke their cloak and/or not issue a cloak as it would be possible to use the cloak as a tool of banevasion. Your client should know how to set bans based on only nicknames by using /ban command.
[20:36] <Myrtti> /ban nickname
[20:36] <Myrtti> this should work atleast in irssi - someone is undoubtedly going to correct me if it doesn't for other clients
[20:36] <Myrtti> other way of expressing bans is the traditional mode +b
[20:37] <pipedream> can you explain more about "cloak" ?
[20:37] <Fuchs> pipedream: a cloak overrides the real host of the user. It is the part right of the @
[20:37] <Fuchs> pipedream: see http://freenode.net/faq.shtml#cloaks
[20:37] <Myrtti> so cloaks are the bit that can hide your hostname or ip address
[20:37] <Fuchs> pipedream: usually you have  nick!ident@host  (which Myrtti will explain), the cloak will override the host part
[20:39] <Myrtti> it can be used as either a way just to hide your hostname part, or to show your affiliation to a project, and often by that rights to certain actions on channels.
[20:40] <Myrtti> Bans are set more generally against a hostmask, that is: nickname!username@hostmask, or more seldomly against a username or a realname. We will touch only the most common usecase of the aforementioned kind, if you need to ban someone by username or realname, ask for help when the need arises. When using a hostmask for banning people, please use appropriate * or ? wildcards.
[20:40] <Myrtti> For example, nickname*!*username@hostmask, nickname*!*@hostmask, *!*@hostmask, or different ip ranges. Cloaks can be wildcarded the same way IP addresses and hostmasks can, for example *!*@dsl-hkibrasgw*.dhcp.inet.fi would ban everyone connecting to IRC from the Helsinki gateway of Sonera, one of the biggest ISP's in Finland, while *!*@*.staffs.ac.uk bans everyone from Staffordshire University.
[20:42] <Myrtti> When using wildcards, try to include the smallest possible range that you think will prevent the user from evading their ban. If you do end up setting a ban on a large range of addresses then make it a banforward to #ubuntu-ops or #ubuntu-irc, or similar so anyone accidentally caught by it can be helped around it.
[20:42] <Jordan_U> Myrtti: Why nickname*!*username@hostmaks and not just nickname!username@hostmask?
[20:42] <Myrtti> One thing to worth noting is the username field, the *!username@* part. If it does not start with a tilde ~, the user connects from a computer or server running identd. identd operates by looking up specific TCP/IP connections and returning the user name of the process owning the connection. In those cases the user can't change the username on their clients and it is safe to assume that while they are connecting from that ...
[20:42] <Myrtti> ... machine, their username stays the same.
[20:43] <pipedream> what is a "banforward"?
[20:43] <Myrtti> pipedream: it will come later on
[20:43] <Myrtti> Jordan_U: because the most common way of changing your nick is appending it with _
[20:43] <Jordan_U> Myrtti: Thanks.
[20:43] <Myrtti> and the * is explained by the above ident tilde
[20:43] <Myrtti> in the ident field
[20:44] <Myrtti> any more questions?
[20:45] <Myrtti> Banforwards are used to guide users to other channels. Their main uses in Ubuntu IRC channels are to guide people to the #ubuntu-ops channel, or if a user has a client that is misbehaving disruptively (disconnecting and rejoining channel on quick succession in a way which is disturbing the discussion or channel itself) to ##fix_your_connection.
[20:45] <Myrtti> Banforwards are set just like normal bans, but at the end of the banmask the channel you want the user to be forwarded to is appended by $<channelname>, for example $#ubuntu-ops. Since some clients use autorejoin on kick, this is one of the usecases where using kick instead of remove is valid. Just remember to set the banforward *before* kicking. The banforwards are set with
[20:46] <Myrtti> /mode +b nick!username@hostmask$##fix_your_connection
[20:47] <Myrtti> [22:47] *** ubuntu-uhri [~myrtti@unaffiliated/myrtti/bot/ubuntu-uhri] has joined  ##fix_your_connection
[20:48] <Myrtti> If you are forwarding someone to ##fix_your_connection, please join the channel yourself to see when their connection stabilises.
[20:49] <Myrtti> Run-by-trolling/spamming attack participants can be unbanned after few hours without discussing it with them, as nicknames, usernames and often ip's are throwaway ones or drone machines and they are unlikely to be used again, and freenode usually responds to big scale multiple channel attacks with K-lines (network bans). It is important to try to keep the ban list as short as possible. Otherwise, unbanning should be done only ...
[20:49] <Myrtti> ... after discussing with the banned person and telling them why they were removed and banned from the channels, either in PM or #ubuntu-ops, #ubuntu-irc or whichever channel you use for your ban arbitration. Unbanning can be done with
[20:49] <Myrtti> /mode -b nickname!username@hostmask
[20:50] <Myrtti> ie. reversing the command the ban was set with.
[20:50] <Myrtti> you might have guessed that unmuting is -q :-)
[20:50] <Myrtti> There is a bit more to being an op, but usually those situations are such that more than one operator are present and can help you. Please do ask for help when you need it.
[20:50] <Myrtti> You can unop yourself with two methods, one by doing it directly yourself and the other by asking chanserv to do it.
[20:51] <Myrtti> /mode -o nickname
[20:51] <Myrtti> /msg chanserv op #ubuntu-sandpit -nickname
[20:51] <Myrtti> Questions, please of help, "omg I'm banned in the sandpit and I can't help it"?
[20:51] <Myrtti> pleas, even
[20:53] <Sidewinder1> I took Ops, then removed Ops; now, I can't seem to take Ops anymore? ;-(
[20:53] <Myrtti> true, that's because the flags are a bit wonky, but that doesn't really matter too much now
[20:54] <Sidewinder1> NP.
[20:55] <Myrtti> let's continue then.
[20:55] <Myrtti> During the years of being an op in Ubuntu IRC channels, I've used both scripts and aliases to interface with nickserv and chanserv and to perform the ops tasks. For years I've used only aliases instead of scripts as I can better monitor and fix what they do. These aliases are for irssi, but you can modify them for XChat quite easily. There are some instructions on how in https://toxin.jottit.com/xchat_user_commands, irssi $C is ...
[20:55] <Rcart> Myrtti: How freenode keeps track of all user (banned, removed) states?
[20:55] <Myrtti> ... %c in XChat, irssi $N is %n in XChat, $0 is %1 in XChat and so on. Quassel has the similar mechanics and most other good IRC clients as well, but I will not discuss them here. Please share your information on them in -chat, I'll mention it in the end of the session.
[20:56] <Myrtti> Rcart: you mean serverside? magic and unicorns. I'm fresh to the job so I've not done a deep plunge into how services and ircd works.
[20:56] <LetoThe2nd> notice: i set +b on myself, but i stayed in the channel. due to special situation that is?
[20:56] <Rcart> Myrtti: yes, about that.
[20:56] <Myrtti> LetoThe2nd: no, you can be banned and stay on the channel
[20:57] <dax> bans stop you from joining the channel. they don't stop you from being in it.
[20:57] <LetoThe2nd> dax: ah.
[20:57] <dax> (they also stop you from talking, like +q)
[20:57] <Myrtti> you need to be removed by /quote remove or /kick or leave yourself, then you can't join it back
[20:57] <Myrtti> or what dax said.
[20:57] <LetoThe2nd> understood
[20:57] <bkerensa> I am following along in silence fyi
[20:57] <Myrtti> continuing on the aliases
[20:58] <Myrtti> I have posted these aliases on my website and I'll give the link after I've explained them here first and finished the tutorial.
[20:58] <Myrtti> /alias NS /^msg nickserv
[20:58] <Myrtti> How do aliases work? Alias sets a shortcode for combining or renaming commands. For example this one creates an alias called NS, which is /^msg nickserv - /^msg directs the command in irssi to the statuswindow (window 1) and doesn't log the messages if you've set to log all your private messages.
[20:59] <Myrtti> /^msg is an irssi specific command though, other users might want to use /msg instead of it
[21:00] <Myrtti> I'll skip some aliases that are in the files as they are quite selfexplanatory
[21:00] <dax> (/ns and /nickserv are also available as server-side commands, so clients that pass unknown commands to the server (which is most of them, not including irssi) will work with them by default)
[21:01] <Myrtti> aw, I should have let you read the script :-P
[21:01] <dax> oops, sorry
[21:01] <Myrtti> oh well.
[21:01] <Myrtti> no, good comment
[21:01] <Myrtti> I'm ignoramus on other clients
[21:01] <Myrtti> /alias BANS /mode +b;/mode +q
[21:01] <Myrtti> this command lists all the bans and quiets on the channel you are on, if you're allowed to see them by the channel flags.
[21:02] <Myrtti> /alias BANSEARCH /msg ubottu @bansearch
[21:02] <Myrtti> /alias BANLOGIN /msg ubottu @login;/msg ubottu @btlogin
[21:02] <Myrtti> if you've got access to ubottu's ban database, you might find these aliases useful. First one searches the database, but isn't too reliable. The latter combines both login commands, the one you need for the bot to recognise you and the second which gives you a link to the bantracker.
[21:03] <Myrtti> /alias CS /msg chanserv
[21:03] <Myrtti> /alias CSHELP /msg chanserv help
[21:03] <Myrtti> /alias CSACCESS /msg chanserv access $C list
[21:03] <Myrtti> this command gives you the access list of the channel you are on
[21:03] <Myrtti> given you have flags for viewing it.
[21:04] <Myrtti> /alias CSOP /msg chanserv op $C $0
[21:04] <Myrtti> this command is short for the command that we used in the beginning of the session to op up or if given a nickname in the end, someone else. Usage:
[21:04] <Myrtti> /csop nickname
[21:04] <Myrtti> /alias CSDEOP /msg chanserv op $C -$0
[21:04] <Myrtti> and this is the the deop command
[21:05] <Myrtti> /alias CSMODE /msg chanserv op $C $N;/wait 2000;/mode $0;/msg chanserv op $C -$N
[21:05] <Myrtti> this command will help you set channelmodes, if mlock isn't set
[21:05] <Myrtti> /alias CSINVITE /msg chanserv op $C $N;/wait 2000;/invite $0;/msg chanserv op $C -$N
[21:05] <Myrtti> will invite someone to a channel you're on, if you're an op
[21:05] <Myrtti> /alias CSTOPIC /msg chanserv op $C $N;/wait 2000;/topic $0-;/msg chanserv op $C -$N
[21:05] <Myrtti> and this will help you change the topic. Please see /cshelp TOPICAPPEND and TOPICPREPEND for other ways of getting ChanServ help you with setting the topic.
[21:06] <Myrtti> /alias CSMUTE /msg chanserv op $C $N;/wait 2000;/mode +zq $0;/msg chanserv op $C -$N
[21:06] <Myrtti> this alias helps you mute
[21:06] <Myrtti> /alias CSREMOVE /msg chanserv op $C $N;/wait 2000;/quote remove $C $0 :$1-;/msg chanserv op $C -$N
[21:06] <Myrtti> /alias CSREMOVEBAN /msg chanserv op $C $N;/wait 2000;/quote remove $C $0 :$1-;/ban $0;/msg chanserv op $C -$N
[21:06] <Myrtti> Remove and Removeban aliases are used with:
[21:06] <Myrtti> /csremove nickname reason
[21:06] <Myrtti> /csremoveban nickname reason
[21:07] <Myrtti> /alias CSR /msg chanserv op $C $N;/wait 2000;/quote remove $C $0 :Please see https://wiki.ubuntu.com/IrcTeam/AppealProcess if you feel mistreated;/msg chanserv op  $C -$N
[21:07] <Myrtti> /alias CSRB /msg chanserv op $C $N;/wait 2000;/quote remove $C $0 :Please see https://wiki.ubuntu.com/IrcTeam/AppealProcess if you feel mistreated;/ban $0;/msg chanserv op  $C -$N
[21:07] <Myrtti> these already have the kickreason, please feel free to change them accordingly to suit your needs.
[21:08] <Myrtti> Note that there are no quickaliases for unbanning, unmuting or doing banforwards. I've found it better to do them by hand.
[21:08] <Myrtti> irssi aliases: http://myrtti.fi/irssialiases
[21:08] <Myrtti> xchat aliases: http://myrtti.fi/xchataliases
[21:08] <EvilResistance> Myrtti, 404 eqivalent errors on xchat
[21:08] <EvilResistance> xchataliases*
[21:08] <Myrtti> alright, I'll have a look
[21:09] <Fuchs> http://myrtti.fi/xchatalias  looks better
[21:09] <EvilResistance> yep
[21:09] <Myrtti> please refresh it
[21:09] <Myrtti> I had forgotten I was still hacking some fixes into it.
[21:10] <LetoThe2nd> a short explaination on the parameters in the alias?
[21:10] <EvilResistance> LetoThe2nd, in which, irssi or xchat?
[21:10] <LetoThe2nd> e.g. $C $N, and so on
[21:10] <EvilResistance> ah
[21:10] <LetoThe2nd> EvilResistance: irssi preferred
[21:10] <Myrtti> N is nick, C is channel you're on
[21:10] <LetoThe2nd> ah, $01, $1 is bash style?
[21:11] <LetoThe2nd> $0, $1, even
[21:11] <Myrtti> 0 and 1 in irssi and 1 and 2 in xchat are the next parameters
[21:11] <Myrtti> yes.
[21:11] <EvilResistance> in xchat, its % though
[21:11] <LetoThe2nd> understood, thanks
[21:11] <EvilResistance> Myrtti, ^
[21:11] <EvilResistance> (restating the earlier statements)
[21:11] <Myrtti> EvilResistance: which is why there is two files with different aliases
[21:11] <Myrtti> one for irssi and one for xchat
[21:11] <EvilResistance> mhm
[21:12] <EvilResistance> hmm... Myrtti, where're you getting /alias from in xchat?
[21:12] <EvilResistance> there's no command stored for that
[21:12] <Myrtti> hm.
[21:12] <EvilResistance> last i checked, you had to write custom scripting for aliases, or use their "User commands" thingy, which isnt as dynamic as irssi aliases
[21:12]  * EvilResistance actively uses xchat
[21:12] <Myrtti> https://toxin.jottit.com/xchat_user_commands has the instructions for it
[21:13] <EvilResistance> mhm
[21:13] <EvilResistance> FYI though: its not 100% reliable though
[21:13] <Myrtti> sorry, there is no direct or easy way of doing them.
[21:13] <EvilResistance> Myrtti, indeed ;P
[21:13] <Myrtti> USE IRSSI. ahem.
[21:13] <Myrtti> :-P
[21:13] <EvilResistance> :P
[21:13] <Myrtti> Now we're moving to irssi only area of this tutorial. If you choose to drop off at this point, thank you for the questions and interest, and hope to see you soon in an Ubuntu IRC channel near you :-)
[21:14] <Myrtti> I'd still recommend you'd stay, for fun and profit.
[21:14] <itmannen> Myrtti<<  Can I have both xchat and irssi open
[21:15] <Fuchs> itmannen: you can have multiple connections to freenode, yes. Note that nicks are unique, though
[21:15] <Fuchs> itmannen: you could use a bouncer to connect with several clients to the same user
[21:15] <itmannen> I am nobe on irssi
[21:15] <itmannen> Fuchs<<  ok
[21:15] <Myrtti> Some useful scripts for irssi that I've used for years are available in the "irssi-scripts" package and some need to be downloaded from scripts.irssi.org or other websites. To enable scripts to autorun when irssi is launched, download / symlink them to .irssi/scripts/autorun
[21:15] <Pricey> irssi-proxy in screen ftw
[21:16] <Fuchs> itmannen: having a bouncer might be helpful anyway if you are not using irssi on a server in screen or so, if you need logs or have other reasons for staying connected 24/7
[21:16] <Myrtti> If you want to manually load them, use /script load <path to the script>
[21:16] <itmannen> Fuchs<<  Aha. Good
[21:16] <Myrtti> splitlong.pl
[21:16] <Myrtti> splits the entered text to snippets long enough not to get cut off and into multiple messages
[21:16] <Myrtti> trackbar.pl
[21:16] <Myrtti> draws a line of characters where the discussion was left when window was changed
[21:16] <Myrtti> autoaway.pl
[21:16] <Myrtti> sets away after a certain time idling
[21:16] <Myrtti> screen_away.pl/tmux_away.pl
[21:16] <Myrtti> sets away after detaching from screen/tmux session. Tmux version is available in http://cybione.org/~cdidier/code/misc/tmux_away.pl
[21:17] <Myrtti> cap_sasl
[21:17] <Myrtti> enables identifying with SASL. Available from http://freenode.net/sasl/cap_sasl.pl - We will return to this later on
[21:17] <Myrtti> nickcolor.pl/format_identify.pl
[21:17] <Myrtti> colours the nicks with different colours. Format identify does all that, *and* differentiates those who are identified from those who aren't.
[21:17] <Myrtti> noisy_query.pl
[21:17] <Myrtti> notifies you on the window you're in that you've got a new query, and notifies who it is with
[21:17] <Myrtti> autowhois.pl
[21:17] <Myrtti> automatically whoises whoever starts a query with you.
[21:18] <Myrtti> Now that you've got basics figured out, here's some extra information about irssi that you might find useful.
[21:18] <Myrtti> Please have a look at
[21:18] <Myrtti> /set
[21:18] <Myrtti> It contains several different settings you can have in your irssi.
[21:18] <Myrtti> when you change the settings, always remember to save them with /save.
[21:18] <Myrtti> try not to edit the configuration file by hand if you can help it.
[21:19] <Myrtti> you can change how even some scripts work with /set
[21:20] <Myrtti> You can move window order in irssi with
[21:20] <Myrtti> /window move <number>
[21:20] <Myrtti> so they are in the order you'd like them to be in.
[21:20] <Myrtti> you can save the layout for later on with
[21:20] <Myrtti> /layout save
[21:20] <Myrtti> If you've got more than 20 windows, you might find it helpful to add the keybindings listed at http://niklas.laxstrom.name/page/eng/irssi - it allows easy window swapping up to 100 windows.
[21:20] <silverlion> o/
[21:21] <Unit193> There is also /win num to swap the windows.
[21:21]  * itmannen_ testing irssi. Sorry
[21:22] <Myrtti> You can change how your irssi looks like by changing your terminal colour scheme and changing the theme irssi is using. Themes with screenshots can be found in http://irssi.org/themes - there are few that I've made or modified (but the ones on the website are a bit old, if you like mine, I'm happy to send you a copy). You can change the theme to a one you've downloaded into your .irssi directory by typing
[21:22] <Myrtti> /set theme name_of_the_theme.theme
[21:22] <Myrtti> remember to /save :-)
[21:23] <Myrtti> any questions so far?
[21:23] <dax> pink detected
[21:23] <Myrtti> pink mentioned
[21:24] <Myrtti> It's easy to search for a word in the buffer
[21:24] <Myrtti> /lastlog word
[21:24] <Myrtti> /lastlog is aliased to last, and it can be used for casesensetive search, regexps, pass the log to a file etc. Use /help lastlog for more information. You can clear the screen from /lastlog output with /lastlog -clear
[21:24] <Myrtti> If you've got something in your awaylog or elsewhere you want to see the context of, you can see if it is still in your buffer and move to certain timespot on that, you can use /scrollback, which is aliased to /sb
[21:24] <itmannen_> Myrtti: Where can I download themes
[21:24] <Myrtti> /sb goto 08:00
[21:24] <Myrtti> moves the scrollback to timestamp 08:00, and
[21:24] <Myrtti> /sb end
[21:24] <Myrtti> returns you back to the latest happenings
[21:24] <Myrtti> itmannen_: you can download themes at http://irssi.org/themes
[21:24] <itmannen> Thanks
[21:24] <Myrtti> and download them to your .irssi directory
[21:25] <itmannen> Ok
[21:25] <Myrtti> the link to the actual theme file is underneath the thumbnail
[21:26] <Myrtti> any questions so far?
[21:26] <itmannen> Yes. a lot :D
[21:27] <itmannen> Go ahead
[21:27] <Myrtti> you can btw return to this classroom material later on as the logs will be published.
[21:27] <itmannen> Good
[21:27] <Myrtti> so if you think you've not noticed something the logs will be there
[21:28] <Myrtti> we'll be moving on to a bit more difficult area which even I can't claim to master.
[21:28] <silverlion> one question ... as an op, do we have to use irssi or can we choose whatever client we want?
[21:28] <Myrtti> you can use whatever client you want which you can actually use to perform your ops duties
[21:29] <dax> Most dedicated IRC clients support all the functions you'd need to op. Some of them are more efficient at it than others.
[21:29] <silverlion> dax: pls state some examples? i am very happy with x-chat so far
[21:29] <dax> silverlion: of good or bad ones?
[21:29] <Myrtti> xchat, irssi, quassel are I think the most popular ones
[21:29] <silverlion> dax: either side ;)
[21:29] <itmannen> Myrtti<<  Why is irrsi a btter client for you
[21:30] <Myrtti> itmannen: we can discuss that later on
[21:30] <itmannen> ok
[21:30] <dax> silverlion: I've seen ops and/or staffers competently using xchat, irssi, weechat, quassel, konversation, kvirc
[21:30] <Fuchs> silverlion: Pidgin and any other IM client you can imagine as bad ones
[21:30] <Myrtti> silverlion: pidgin and empathy aren't dedicated IRC clients and I wouldn't recommend their usage for any serious IRC unless you've got a massive streak of masochism.
[21:30] <Fuchs> silverlion: also bitchx (which fortunately is dead) as a bad one
[21:31] <dax> (for what it's worth, I've heard empathy folks say the same thing. it's not that Empathy is crap, it's that IRC is not what it's designed for)
[21:31] <Myrtti> oh yes, let's not go to that, I'll start ranting about away messages.
[21:31] <Myrtti> anyway
[21:31] <Fuchs> Myrtti: maybe a small note on IRC behaviour would not be bad, including away nicks and -messages ;)
[21:32] <silverlion> as i am tied to linux for the next few weeks (my main computer is sent in for maintenance) i'll think about using x-chat
[21:32] <Myrtti> Fuchs: let's not. I have nothing polite to say and we're running out of time
[21:32] <Fuchs> silverlion: XChat is fine, just don't use XChat-Gnome
[21:32] <Fuchs> Myrtti: okay, sorry :)
[21:32] <Myrtti> so - the part that I'm not so familiar with and I can't personally help you with too much
[21:33] <Myrtti> I've had to do it only once and I don't plan to do it again on my irssi for a while...
[21:33] <Myrtti> If you are running your irssi on a relatively new Ubuntu installation, you've already got some settings in. However, it might be wiser to do it properly from scratch instead of playing on the defaults. I'll assume that you want also the safest and recommended way of connecting to freenode too, so we'll add a few bits. If you're the admin of your server, you should be able to install the extra bits and pieces to enable SSL and ...
[21:33] <Myrtti> ... SASL. On Ubuntu the relevant packages are ca-certificates libcrypt-blowfish-perl libcrypt-dh-perl libcrypt-openssl-bignum-perl libmath-bigint-gmp-perl. If you can't install the packages with the package management, you can try to install them with CPAN: Crypt::Blowfish Crypt::DH Crypt::OpenSSL::Bignum Math::BigInt Math::BigInt::FastCalc Math::BigInt::GMP - if you need to use CPAN, you still need to check you've got the needed ...
[21:33] <Myrtti> ... certificates.
[21:34] <dax> (for the Debian folks, the package names are the same)
[21:34] <Myrtti> I have no experience on this part at all - I run my irssi on a hosted server and all I needed to do was to email to the admins and ask them pull the Debian packages
[21:36] <Myrtti> We've connected using /server earlier, but let's start from the bottom up.
[21:36] <Myrtti> Download the script to your .irssi/scripts
[21:36] <Myrtti> make a symbolic link into .irssi/scripts/autorun/cap_sasl.pl
[21:36] <Myrtti> and let's first check that we've got the script loaded, with
[21:36] <Myrtti> /script load cap_sasl.pl
[21:36] <Myrtti> or
[21:36] <Myrtti> /script load autorun/cap_sasl.pl
[21:36] <Myrtti> and set the script up with
[21:36] <Myrtti> /sasl set Freenode registerednickname password DH-BLOWFISH
[21:36] <Myrtti> /sasl save
[21:36] <Myrtti> /save
[21:37] <Myrtti> MAKE SURE YOU ISSUE THE COMMANDS IN THE STATUS WINDOW - at /w 1
[21:38] <Myrtti> now is the time to reveal a weakness in irssi
[21:38] <dax> (I note that "registerednickname" must be your nickserv accountname, not another grouped nick)
[21:39] <Myrtti> irssi uses a plaintext config file, and if you've got autosendcmd or server password for your nickserv account identifications, they will be in plain text. Likewise the sasl password will be in a plaintext file
[21:41] <Myrtti> if you want more security and are running irssi on your own machine/shell, have a look at http://pthree.org/2012/02/28/encrypt-your-irssi-config/
[21:41] <Myrtti> it's not pretty or optimal though.
[21:41] <Myrtti> once you're past this stage, the script loads nicely etc. we can continue
[21:42] <Myrtti> now we can start configuring irssi the way we'd normally configure it
[21:42] <Myrtti> first by adding a network
[21:42] <Myrtti> /network add freenode
[21:42] <Myrtti> for more options please see /help network, and then add a server to it with
[21:42] <Myrtti> /server add -auto -ssl -ssl_verify -ssl_capath /etc/ssl/certs -network freenode irc.freenode.net 7000
[21:42] <Myrtti> this adds a server, which connects automatically using ssl certificates in /etc/ssl/certs, to the network freenode, at address irc.freenode.net at port 7000. To add channels, issue
[21:42] <Myrtti> /channel add -auto #ubuntu freenode
[21:42] <Myrtti> which adds channel #ubuntu in freenode to be joined automatically.
[21:42] <Myrtti> /save
[21:43] <Myrtti> to save the settings to a file.
[21:43] <Myrtti> If you've set up your client the way instructed here, you can now enter the aliases in the link http://myrtti.fi/irssialiases and they work no matter how many networks you've got your irssi connecting to.
[21:43] <Myrtti> any questions?
[21:44] <Myrtti> (I can try to answer questions, but I probably can't help you installing the dependencies for cap_sasl.pl to work, sorry)
[21:44] <itmannen> I try later on
[21:44] <EvilResistance> Myrtti, cap_sasl.pl exists for xchat, works OOTB except on Windows.  Also, see privmsg.
[21:46] <Myrtti> Windows is our special snowflake
[21:46] <EvilResistance> mmm, you'd be surprised how many ubuntuers get stuck on Windows due to drive failures :/
[21:46] <Myrtti> I'll have a few words about screen and tmux. They are meant to keep your processes and programmes alive even if you end your session in a TTY or ssh. Byobu is moving from screen to using tmux and I've also found tmux to give better results even if used only for irssi management, as UTF-8 characters that might cause trouble are shown better with tmux.
[21:46] <itmannen> Windows ? What is that ? :)
[21:46] <Myrtti> I won't go into further details in this session than mentioning that if you have an access to a linux machine that is on 24/7 and you can ssh into, be it a shell server hosted by your friends, a shell account provider, an old box you keep running all the time or a dedicated device, NSLU-2/Viglen MPC-L or similar, this might be a good way to do your IRCing. irssi can handle several server connections and windows up to 1000, ...
[21:46] <Myrtti> ... although it is a bit painful at that time.
[21:47] <Myrtti> If you are using screen, you can detach your session with ctrl-a-d. You can reattach it with
[21:47] <Myrtti> screen -x -- this attaches the session to where you are issuing the command now, but if it's open elsewhere, keeps it open there as well
[21:47] <Myrtti> screen -dr -- this deattaches the ongoing session if such exists and reattaches in where you're issuing the command
[21:47] <Myrtti> screen -Dr -- this deattaches the ongoing session *and* disconnects SSH connection if such exists and reattaches in where you're issuing the command. Perfect if you're paranoid over if you remembered to disconnect the SSH.
[21:48] <Myrtti> If you are using tmux, you can detach your session with ctrl-b. If you've got an Android phone, I strongly suggest you change the keybinding for that to the same as what screen uses, as the best Android SSH client for irssi usage has shortcuts for screen keycombos.
[21:49] <Myrtti> (irssi connectbot, which also has a channel on freenode - unsurprisingly #irssiconnectbot)
[21:49] <ClassBot> There are 10 minutes remaining in the current session.
[21:49] <Myrtti> My .tmux.conf file is
[21:49] <Myrtti> set -g prefix C-a
[21:49] <Myrtti> set -g status off
[21:49] <Myrtti> set -g detach-on-destroy on
[21:50] <Myrtti> I don't however use tmux for anything else than irssi session management, so you might want to set it to your own needs.
[21:50] <Myrtti> If you are using tmux, you can reattach the session with
[21:50] <Myrtti> tmux -a -- this attaches the session to where you are issuing the command now, but if it's open elsewhere, keeps it open there as well
[21:50] <Myrtti> tmux -a d -- this deattaches the ongoing session if such exists and reattaches in where you're issuing the command.
[21:50] <Myrtti> and  - that was it.
[21:50] <Myrtti> le finis
[21:50]  * AlanBell claps
[21:50]  * Fuchs claps
[21:50] <Myrtti> any questions?
[21:50] <itmannen> Thank you for a good lesson
[21:51] <Rcart> Myrtti: how do u specify a session in screen?
[21:51]  * LetoThe2nd pop a bottle of champagne
[21:51] <AlanBell> thanks Myrtti, I will have to go read that through again slowly :)
[21:52] <Myrtti> Rcart: that is a good question which I unfortunately can't really answer beyond what I can read from "man screen" :-|
[21:52] <dax> Rcart: as in telling it which one to reconnect to if you have more than one?
[21:52] <Myrtti> but yeah, the answer is depending on what you need to specify it for
[21:52] <dax> if so, `screen -ls' will tell you information about them like PID that you can use as an option to screen -r
[21:53] <LetoThe2nd> Myrtti: one small thing: in the cap_sasl example you gave, you referred to irc.freenode.net:6667, right?
[21:53] <Rcart> dax: yep
[21:53] <Myrtti> LetoThe2nd: no, I used a port and command that enable SSL as well
[21:53] <Rcart> dax: Oh, great (:
[21:53] <dax> "All freenode servers listen on ports 6665, 6666, 6667, 6697 (SSL only), 7000 (SSL only), 7070 (SSL only), 8000, 8001 and 8002."
[21:54] <Rcart> Myrtti: Thanks for the talk o/
[21:54] <ClassBot> There are 5 minutes remaining in the current session.
[21:54] <dax> (just in case anyone was wondering which ports are valid)
[21:54] <itmannen> Goodby and thank you
[21:55] <LetoThe2nd> Myrtti: i see. no idea where the 6667 in the config came from, manually setting it to 7070 fixed it anyway
[21:55] <dax> LetoThe2nd: it's the default port, so possibly you missed setting one originally
[21:55] <LetoThe2nd> dax: yeah, probably
[21:55] <Myrtti> itmannen: so why I use irssi? it's especially nice if you are a student and need to change the computer every now and then, or travelling
[21:56] <itmannen> Myrtti<< Ok.
[21:56] <benonsoftware>  /mode
[21:56] <AlanBell> if anyone wants to carry on playing in -sandpit feel free to do so
[21:56] <dax> Personally, I use irssi because of what Myrtti said and also because I've used other IRC clients and it takes more time for me to do things in them, especially the GUI ones.
[21:56] <AlanBell> do some bans and quits and quiets etc
[21:57] <Myrtti> yup, feel free to fiddle - the channel will be closed down at some point though
[21:57] <Myrtti> I hope I had something new for everyone
[21:57] <LetoThe2nd> getting too late. thanks and good night!
[21:57] <Myrtti> --> https://wiki.ubuntu.com/IRC/IrcTeam/OperatorGuide#Useful_Scripts irssi, xchat, and quassel.
[21:58] <Myrtti> thank you everyone
[21:59] <AlanBell> well done Myrtti :)
[21:59] <Myrtti> \o/
[21:59] <ClassBot> Logs for this session will be available at http://irclogs.ubuntu.com/2012/03/12/%23ubuntu-classroom.html
[21:59] <Fuchs> Definitely, yes  :)
[21:59]  * Fuchs hands Myrtti a bunch of flowers and wanders off
[22:30] <bkerensa> :D
[22:32] <bkerensa> Myrtti: Do you have the link to your site with the aliases? I had to pop out halfway through
[22:32] <Myrtti> irssi aliases: http://myrtti.fi/irssialiases
[22:32] <Myrtti> xchat aliases: http://myrtti.fi/xchataliases
[22:35] <EvilResistance> Myrtti, http://myrtti.fi/xchatalias, no?  i thought xchataliases 404;d
[22:35] <EvilResistance> oh nevermind :p
[22:35] <EvilResistance> its been fixed xD
[22:36] <Myrtti> of course it was fixed
[22:36] <Myrtti> I fixed it there and then
[22:36] <Myrtti> was fixed when I told you to refresh
[22:36] <EvilResistance> it still 404'd after that, even after a reboot
[22:36] <Myrtti> :-|
[22:39] <EvilResistance> (battery died, so...)
[22:48] <EvilResistance> Myrtti, i'm writing your xchat aliases into a script, that can be loaded into xchat on any system that has perl (including Windows), because XChat doesnt have an /alias command
[22:48] <Myrtti> yeah, that's nice
[22:48] <EvilResistance> (and the syntax in some of your commands is broken anyways, so i'm fixing it as I go)
[22:49] <Myrtti> bkerensa: ^
[22:49] <EvilResistance> 'tis a tad difficult, been a while since I coded in Perl
[22:49] <Myrtti> alright
[22:49] <EvilResistance> xD
[22:49] <bkerensa> Myrtti: ok :)
[22:49] <EvilResistance> once its released, I'll throw it your way :p
[22:49] <Myrtti> good enough reason and suddenly motivation and need appears
[22:49] <Myrtti> :-P
[22:50] <EvilResistance> did I mention Perl on windows is evil as [REDACTED WORDS]?
[22:56] <EvilResistance> Myrtti, i take it you dont use xchat, right?
[22:56] <EvilResistance> or do you?
[22:56] <EvilResistance> (I'll need a tester after i'm done converting your aliases into a script)
[22:56] <Myrtti> EvilResistance: never have.
[22:57] <Myrtti> I moved from mIRC directly to irssi in 2002
[22:57] <Myrtti> if not earlier
[22:58] <bkerensa> I think I moved to mIRC in 1999
[22:58] <bkerensa> when I mostly abandoned Windows
[22:58] <Myrtti> moved to or from?
[22:58] <bkerensa> from
[22:58] <bkerensa> :D
[22:58] <Myrtti> that makes more sense
[22:58] <EvilResistance> heh
[22:58] <EvilResistance> alrighty, i'll test myself when this is done
[22:59] <bkerensa> from mIRC to BX
[22:59] <Myrtti> EvilResistance: do you need ubuntu-uhri for testing?
[22:59] <Myrtti> or are you fine without?
[22:59] <EvilResistance> Myrtti, #ubuntu-uhri?
[22:59] <ubuntu-uhri> hi
[22:59] <ubuntu-uhri> me
[22:59] <EvilResistance> oh
[22:59] <EvilResistance> i'm not going to be done for a while, i've got calculus lecture shortly
[22:59] <EvilResistance> but it wouldnt hurt to have a tester
[22:59] <EvilResistance> :P
[23:00] <EvilResistance> (also, xchat scripting with Perl can be *quite* a pain :/)
[23:00] <Myrtti> it's irssi so it can be used for testing kicks and such, so not much else
[23:00] <Myrtti> but -
[23:00] <Myrtti> it's running from my own laptop instead of the shell server so it will go down in abit
[23:00] <Myrtti> it's 0100am here
[23:00] <EvilResistance> Myrtti, http://pastebin.com/TVWWjCmj  <-- that's what i've got so far, and i'm only up to nsidentify
[23:01] <EvilResistance> you can see how complex scripting this is :/
[23:01] <EvilResistance> (lots of repetetive code, checking to make sure there are arguments given for commands that need them, etc.)
[23:01] <Myrtti> well, you do realise that there is already nickserv.py or whatnot?
[23:02] <EvilResistance> mhm, but not every python xchat script has the functionality of perl xchat scripts
[23:02] <EvilResistance> besides, i dont have python on this machine here
[23:02] <Myrtti> mmmm
[23:02] <EvilResistance> so i'm stuck with perl
[23:02] <Myrtti> ok
[23:02] <Myrtti> well anyway, time to head for bed.
[23:02] <Myrtti> ubuntu-uhri will be back online sometime next 10 hours or so.
[23:02] <EvilResistance> ok
[23:03] <Myrtti> tara
[23:03] <EvilResistance> (i'll probably still not be done by then xD)