[dev] iim - ii improved and rewriten

From: Ivan Kanakarakis <ivan.kanak_AT_gmail.com>
Date: Tue, 8 Jan 2013 04:05:18 +0200

hello all,

I've been tweaking ii's code lately, mainly cleaning it up
and fixing a couple of things I noticed, but ended up
rewriting it from scratch.
Thus resulted iim[0] (name given by ^7heo on irc - thanks)

----
what  I did not like about ii (source code wise)
1. inconsistent indentation and formatting (this is how the
cleanup started)
2. server message parsing -- proc_server_cmd and tokenize
functions need to be simplified!
3. (own) nick handling can go wrong
4. channels are created regardless of being valid or not
and maybe some other minor things that I'm missing atm.
I do hope I'll get the time to send in some patches.
I think no.2 is the more serious and annoying thing in ii atm
and it would cause the most changes.
----
iim does exactly what ii does but is smaller (364sloc)
and (imo at least) simpler and more readable (in terms
of source code), while more easily extendable to support
more commands, and actually does support more commands.
"output-wise" the only place where iim differs with ii is in
three place, regarding what is printed to the 'out' file:
a) a server message on ii is printed as
    YYYY-MM-DD HH:MM -!- server message
while on iim the server is not special-cased and treated as
a normal user, so a server message on iim would be
    YYYY-MM-DD HH:MM <-!-> server message
b) I've intentionally hidden the host of join/part-ing users.
I think it only adds clutter to the output, while irc provides
the means to retrieve the host if needed when it is needed.
So, on ii when a user joins a channel you get:
    YYYY-MM-DD HH:MM -!- user (host) has joined #foo
    YYYY-MM-DD HH:MM -!- user (host) has left #foo
while iim lacks the host, so
    YYYY-MM-DD HH:MM -!- user has joined #foo
    YYYY-MM-DD HH:MM -!- user has parted #foo
lso goes for
c) /path/to/irc-dir/network/out file would show MOTD, the
welcome message as coming from '-' or '*' or a NAMES
command as coming from '#foo' or '=' etc.
For iim all those are correctly handled and printed as coming
from the server (-!-)
iim supports more commands, those currently are
/k <user>  -- to kick the specified user from the current channel
/i <user> -- to invite a user to the current channel
/u -- to retrieve the user list for the current channel which will be
printed in the current channel
/q -- to quit (it quits with success too :D)
it still lacks a Makefile and a man page, but those will come.
actually a Makefile is not much needed as it can be invoked
as shown in the README file on the repo.
so, feel free to test it and/or contact c00kiemon5ter on freenode
or oftc to report any bugs or issues -- or reply to this thread (if
the suckless people are ok with that).
anyhow, I've been using ii for the last half-a-year and
now iim along with iii[1] as a frontend and I've been
really happy with it. plus I need no damn curses :)
so thanks for ii :) here[2] is a shot for you
so many i's so few cookies >:3
  [0]: https://github.com/c00kiemon5ter/iim
  [1]: https://github.com/c00kiemon5ter/iii
  [2]: http://ompldr.org/vZ3ppaw
-- 
*Ivan c00kiemon5ter V Kanakarakis*  >:3
Received on Tue Jan 08 2013 - 03:05:18 CET

This archive was generated by hypermail 2.3.0 : Tue Jan 08 2013 - 03:12:04 CET