LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-05-2024, 08:05 AM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
How to post a IM message on a IRC channel with BASH / Perl or Python code ?


Hello,

How to post a IM message on a IRC channel with BASH / Perl or Python code ?

I need a little code to post a message on e.g. #whatever at irc.libera.chat, with crontab.

Any idea of a little bash code?

Kind regards,
x.
 
Old 03-05-2024, 08:16 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,312
Blog Entries: 3

Rep: Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722Reputation: 3722
The CPAN page for Bot::Basic has a short demo doing just that. It could be modified for your needs easily, I expect.

But if you need something more complex than just posting, POE::Component::IRC may be the way to go though it is much more complex.
 
Old 03-05-2024, 10:46 AM   #3
enigma9o7
Senior Member
 
Registered: Jul 2018
Location: Silicon Valley
Distribution: Bodhi Linux
Posts: 1,388

Rep: Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560Reputation: 560
Most channels default to +n which means you have to join the channel to post a message too.
 
Old 03-08-2024, 02:33 AM   #4
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Original Poster
Rep: Reputation: 255Reputation: 255Reputation: 255
Quote:
Originally Posted by enigma9o7 View Post
Most channels default to +n which means you have to join the channel to post a message too.

therefore the C/C++ or python code, shall login, wait and go to channel... wait, and post .. no?
 
Old 03-08-2024, 08:30 AM   #5
jayjwa
Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 779

Rep: Reputation: 246Reputation: 246Reputation: 246
Something like this: https://pythonspot.com/building-an-irc-bot/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NEED HELP! Want to code PERL and Python on VS Code on Fedora KDE 27 GHOSTIN7HESHELL Linux - Software 13 02-15-2018 05:00 PM
[SOLVED] tzap ERROR: could not find channel <channel name> in channel list tonj Linux - Software 0 12-19-2015 07:45 PM
[SOLVED] perl scripted irc bot having issues with channel names Djyou Programming 3 07-03-2014 03:21 PM
LXer: Python Python Python (aka Python 3) LXer Syndicated Linux News 0 08-05-2009 08:30 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration