Page 1 of 1

pmirc - CLI irc client

Posted: Sun 31 Jul 2011, 19:03
by goingnuts
I wanted to make an irc client with some initial user choices (server, nickname), some formating of output and working with busybox applets only...still some fine tuning of the formating could be done...
Creates a log in /root/.pmlirc directory
# main irc function from:
# http://lists.canonical.org/pipermail/kr ... 00480.html
# other bits from:
# http://www.murga-linux.com/puppy/viewto ... 385#486385
# https://github.com/pabloPXL/irc.sh
# https://github.com/halhen/shic
# works with telnet and nc (netcat) - change 1 line down in script

Use the normal irc commands after start ex.: "/join #puppylinux", "/quit"

Posted: Mon 01 Aug 2011, 04:52
by 01micko
What a little gem!

Here's part of my log just to confirm it works.
:pupngo_user_915 MODE pupngo_user_915 :+i

:pupngo_user_915!~pmirc@115-64-206-145.tpgi.com.au JOIN :#puppylinux

:adams.freenode.net 332 pupngo_user_915 #puppylinux :Puppy Linux support chat | Latest official Puppy: Lucid 5.2.5 http://alturl.com/idc4q | Wary 5.1.2 http://alturl.com/hewq8 | PLEASE ask your question and wait PATIENTLY for a response. | Or search for an answer at http://tinyurl.com/34f4lq

:adams.freenode.net 333 pupngo_user_915 #puppylinux J_Rey!~J_Rey@JRey-1-pt.tunnel.tserv13.ash1.ipv6.he.net 1306341663

:adams.freenode.net 353 pupngo_user_915 = #puppylinux :pupngo_user_915 FrogLeader puppeee-user jayne J_Rey genera kidkat dejan555 Mirpupdesktop RoxFox64 azstew robsbots_lappy PupUser94bb33 P4R4N01D Tapionp autr sickgut sta19 mama21mama chum_bucket Rupp Roin gnz11 JStoker dTal waabimiigwan ikonia tomaw Salamander ron_o Fudge Mitzi helen kloeri @ChanServ tty234 dropdrive PuppyLinux Mir FreeBSOD Drakevr

:adams.freenode.net 366 pupngo_user_915 #puppylinux :End of /NAMES list.

:ChanServ!ChanServ@services. NOTICE pupngo_user_915 :[#puppylinux] Welcome to #puppylinux. Read our rules & info about this chat at: http://puppylinux.org/wikka/IRC | Main Sites: puppylinux.com & puppylinux.org | Forum @ http://bit.ly/PupForum

:FrogLeader!~FrogLeade@c-98-232-200-70.hsd1.or.comcast.net PRIVMSG #puppylinux :Fan Problems on Acer 7720. Anyone want to take a shot?

:Tukeke!~Tukeke@unaffiliated/tukeke JOIN :#puppylinux

:chum_bucket!~Administr@host81-141-39-118.wlms-broadband.com PRIVMSG #puppylinux :its working

:FrogLeader!~FrogLeade@c-98-232-200-70.hsd1.or.comcast.net PRIVMSG #puppylinux :Any Dev's online here today?

:pupngo_user_915!~pmirc@115-64-206-145.tpgi.com.au QUIT :Client Quit

ERROR :Closing Link: 115-64-206-145.tpgi.com.au (Client Quit)

Connection closed by foreign host
My status aren't recorded it seems.

Note I used the telnet method and got the error at the bottom of the log, not quiting cleanly?
nc method seems the same. Let me know if you want the full logs.

One other little bug, I get mkdir error, directory exists at start (referring to the ~/.pmirc) ... seems "-d" instead of "-p" is needed? [line 159]

Posted: Mon 01 Aug 2011, 13:01
by sc0ttman
I dont use IRC very much at all, but I tested this anyway...
Another little gem from goinguts, as Micko says! :)

Posted: Mon 01 Aug 2011, 17:32
by goingnuts
01micko & sc0ttman: Thanks for testing!
01micko: Setting your status just type: "/away im busy" and to remove again type "/away" - if thats what you mean. If it is status in the log I haven't looked at that...
The ERROR at quiting I do not know how to remove...thought that its was a normal message from server when quiting. Anyone knows about this?

Other commands works the same way: try "/admin" or "/PRIVMSG nick message" to send a private "message" to user "nick".
A good reference for commands to try (not all recognized by all servers).

Posted: Wed 31 Aug 2011, 00:02
by banger0250
Yes i get the client has quit msg on abjects server with x-chat

Posted: Wed 06 May 2015, 19:56
by johnywhy
hi,

anybody know if pmirc supports SASL? When i try to connect to freenode, i get "identify via SASL" error.

when i try to connect to irc.ircnet.com, i get "telnet: bad address 'irc.ircnet.com'"

(on xSlacko)

thx!

Posted: Thu 07 May 2015, 04:02
by goingnuts
Just tested that it still works in P412(freenode)...
irc.ircnet.com doesent work.

Have you tried the nc-way? (remove comment line 193 and comment out line 194).
I have attached a version of netcat (=nc) that works here. Download, rename to netcat, place it /bin and change "nc" to "netcat" in line 193.

Posted: Thu 07 May 2015, 11:06
by tlchost
Nice script....would you consider adding

If one selects use a specific nick, have option to enter password ?

thanks

Posted: Thu 07 May 2015, 14:50
by goingnuts
tlchost: Attached version might work - please test and give feedback.

Posted: Thu 07 May 2015, 17:03
by johnywhy
goingnuts wrote:Have you tried the nc-way? (remove comment line 193 and comment out line 194).
tried your original pmirc again, and got:

Code: Select all

mkdir: can't create directory '/root/.pmirc': File exists
- *** Looking up your hostname...
- *** Checking Ident
- *** Couldn't look up your hostname
- *** No Ident response
- Welcome to the freenode Internet Relay Chat Network johnywhy
- Your host is wolfe.freenode.net[91.217.189.44/6667], running version ircd-seven-1.1.3
seems to have connected. Don't know why i did not get the "identify via SASL" error this time. Only difference is, i installed via ppm when i got "identify via SASL" error. This time, just executed pmirc from my downloads folder.

then tried your edit of lines 193, 194, got same result (connected).

As experiment, i deleted /root/.pmirc. Your original pmirc again gave same result as above (it connected). Then deleted /root/.pmirc. then tried your edit of lines 193, 194, got same result (connected).

not getting "identify via SASL" error with either version now.
goingnuts wrote:I have attached a version of netcat (=nc) that works here. Download, rename to netcat, place it /bin and change "nc" to "netcat" in line 193.
tried, but this file does not seem to contain any editable text.

Posted: Thu 07 May 2015, 17:57
by goingnuts
johnywhy: Thx for testing - nice it works now. The netcat is not a script - its a replacement for nc. So you put the netcat in /bin and modify pmirc script to use that by replacing "nc" with "netcat". I uploaded it to be sure that a working netcat was used - but seems not needed as you connect fine now. Various telnet and nc (busybox-based or others) might give different results.
The "mkdir: can't create directory '/root/.pmirc': File exists " should be fixed in the newer pmirfc script - if it works with password when setting nickname I will replace the original pmirc with the new one.

Posted: Thu 07 May 2015, 18:50
by johnywhy
goingnuts wrote:The netcat is not a script - its a replacement for nc. So you put the netcat in /bin and modify pmirc script to use that by replacing "nc" with "netcat".
i get it. but i think you're saying no longer necessary?

fyi, i'm seeing:
- *** Couldn't look up your hostname
- *** No Ident response
- Welcome to the freenode Internet Relay Chat Network
which is no worry, right?
goingnuts wrote:f it works with password when setting nickname I will replace the original pmirc with the new one.
i'm seeing:
- +i
- This nickname is registered. Please choose a different nickname, or identify via /msg NickServ identify <password>.
i guess i used that nick before-- not sure of my password. Getting:
msg NickServ identify password
- No text to send
/msg NickServ REAUTH
- Unknown command
msg NickServ REAUTH
- No text to send
thx!

Posted: Fri 08 May 2015, 08:30
by tlchost
goingnuts wrote:tlchost: Attached version might work - please test and give feedback.
It did not ask me for a password when I elected to enter my own nick

Posted: Fri 08 May 2015, 16:20
by goingnuts
tlchost: Maybe try attached fake .gz file instead - should be impossible to avoid giving a password when user nick is chosen. If password not needed just type something. The point is to evaluate if it works when password is needed....

Posted: Fri 08 May 2015, 16:36
by johnywhy
using your latest pmirc and netcat files:
- *** Looking up your hostname...
- *** Checking Ident
- *** Found your hostname
- *** No Ident response
- *** Notice -- You need to identify via SASL to use this server
Closing Link: m842036d0.tmodns.net (SASL access only)
note, on VLina, also necessary to mark files "executable" during install, or get permissions error.

thx!

Posted: Fri 08 May 2015, 17:21
by goingnuts
johnywhy: Seems SASL is an irc server thing that some irc servers request to give you access. I have no knowledge about this and do not know if netcat, nc or telnet can be used to support this SASL request. Sorry. What server are you trying to connect to?

Posted: Fri 08 May 2015, 19:22
by johnywhy
goingnuts wrote:johnywhy: Seems SASL is an irc server thing that some irc servers request to give you access. I have no knowledge about this and do not know if netcat, nc or telnet can be used to support this SASL request. Sorry. What server are you trying to connect to?
freenode.

i don't know if the info below will be useful, but FWIW:

freenode says:
When there are repeated problems with abuse or anti-social behavior from an IP range, and the users on that IP range seem to have the ability to rapidly change between many different IPs, freenode is left with the uncomfortable choices of completely blocking access to the entire range, doing nothing, or turning to SASL. SASL allows freenode to avoid a complete block while still mitigating potential abuse.

Client support for SASL relies on the CAP IRC client extension
https://freenode.net/sasl/
(btw, they're not talking about me-- i pretty much never even use irc. whenever i try irc tech support, seems like nobody ever answers anyway :D No rush implementing this for my sake-- i can always just use their web-client)

here's about the cap extension:
The capabilities extension is implemented by addition of one command
with several subcommands. The command added is *CAP*. CAP takes a
single, required subcommand, optionally followed by a single
parameter consisting of a space-separated list of capabilities.
https://tools.ietf.org/html/draft-mitch ... #section-3
here are some cap SASL links:
https://github.com/atheme/charybdis/blo ... c/sasl.txt
https://github.com/ircv3/ircv3.github.i ... %93&q=sasl
https://metacpan.org/search?q=sasl&size=20

thx!

Posted: Sat 09 May 2015, 01:11
by tlchost
johnywhy wrote:
(btw, they're not talking about me-- i pretty much never even use irc. whenever i try irc tech support, seems like nobody ever answers anyway
No one answers because most of the nicks are simply lurking...in terms of helping, building a sence of community or doing anything positive, they are as useful as dead skin cells.

Posted: Sat 09 May 2015, 01:12
by tlchost
goingnuts wrote:tlchost: Maybe try attached fake .gz file instead - should be impossible to avoid giving a password when user nick is chosen. If password not needed just type something. The point is to evaluate if it works when password is needed....
Well,,,,i got the netcat message.

Posted: Sat 09 May 2015, 03:38
by johnywhy
tlchost wrote:most of the nicks are simply lurking...in terms of helping, building a sence of community or doing anything positive, they are as useful as dead skin cells.
in contrast, peeps on the puppy forum are active, responsive, excited, enthusiastic, and super helpful.

but really, what else would you expect from people who use an operating system with a cute, adorable, lovable name like "Puppy"?

:D