pmirc - CLI irc client

Browsers, email, chat, etc.
Post Reply
Message
Author
goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

pmirc - CLI irc client

#1 Post 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"
Attachments
pmirc310711.tar.gz
pmirc is a CLI irc client
(2.35 KiB) Downloaded 406 times

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#2 Post 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]
Puppy Linux Blog - contact me for access

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#3 Post by sc0ttman »

I dont use IRC very much at all, but I tested this anyway...
Another little gem from goinguts, as Micko says! :)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#4 Post 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).

User avatar
banger0250
Posts: 44
Joined: Thu 12 Aug 2010, 20:23
Location: Rothwell,Brisbane,Qld,AU

#5 Post by banger0250 »

Yes i get the client has quit msg on abjects server with x-chat
Taking pup for a walk

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#6 Post 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!
[b]Now[/b]: X-Tahr 2.0! StretchDog! DevuanDog!
[b]Tops[/b]: TarhNOP Vlina-R2 Racy
[b]Used[/b]: Puppeee Precise Lucid Wary Tahrpup Quirky Slacko MacPup Saluki Puppy Studio LxPupTarh Lina-Lite Lina
[i]i ♥ Puppy[/i]

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#7 Post 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.
Attachments
netcat.gz
fake .gz extention
(65.72 KiB) Downloaded 186 times

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#8 Post by tlchost »

Nice script....would you consider adding

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

thanks

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#9 Post by goingnuts »

tlchost: Attached version might work - please test and give feedback.
Attachments
pmirc20150507.tar.gz
updated with password and bugfix
(2.46 KiB) Downloaded 159 times

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#10 Post 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.
[b]Now[/b]: X-Tahr 2.0! StretchDog! DevuanDog!
[b]Tops[/b]: TarhNOP Vlina-R2 Racy
[b]Used[/b]: Puppeee Precise Lucid Wary Tahrpup Quirky Slacko MacPup Saluki Puppy Studio LxPupTarh Lina-Lite Lina
[i]i ♥ Puppy[/i]

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#11 Post 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.

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#12 Post 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!
[b]Now[/b]: X-Tahr 2.0! StretchDog! DevuanDog!
[b]Tops[/b]: TarhNOP Vlina-R2 Racy
[b]Used[/b]: Puppeee Precise Lucid Wary Tahrpup Quirky Slacko MacPup Saluki Puppy Studio LxPupTarh Lina-Lite Lina
[i]i ♥ Puppy[/i]

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#13 Post 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

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#14 Post 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....
Attachments
pmirc.gz
fake .gz - rename to pmirc
(5.89 KiB) Downloaded 153 times

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#15 Post 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!
[b]Now[/b]: X-Tahr 2.0! StretchDog! DevuanDog!
[b]Tops[/b]: TarhNOP Vlina-R2 Racy
[b]Used[/b]: Puppeee Precise Lucid Wary Tahrpup Quirky Slacko MacPup Saluki Puppy Studio LxPupTarh Lina-Lite Lina
[i]i ♥ Puppy[/i]

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#16 Post 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?

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#17 Post 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!

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#18 Post 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.

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#19 Post 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.

User avatar
johnywhy
Posts: 879
Joined: Sat 20 Aug 2011, 14:52

#20 Post 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
[b]Now[/b]: X-Tahr 2.0! StretchDog! DevuanDog!
[b]Tops[/b]: TarhNOP Vlina-R2 Racy
[b]Used[/b]: Puppeee Precise Lucid Wary Tahrpup Quirky Slacko MacPup Saluki Puppy Studio LxPupTarh Lina-Lite Lina
[i]i ♥ Puppy[/i]

Post Reply