5

I'm looking for a IRC client library/script written in PowerShell. The goal is to replace a Perl script that uses Net::IRC to communicate with a MindAlign channel.

SmartIrc4net will do in a pinch, but I'd rather have a pure implementation for simplicities sake.

Ideas?

Scott Weinstein
  • 18,890
  • 14
  • 78
  • 115
  • Really? Even the sockets and session management and everything? Powershell is a very poor language for running daemons (this coming from its biggest fan). Why not use/build an IRC client in an existing .Net language, then supply Powershell scripts as plugins? Executing PS from .Net is very simple. – Richard Berg Aug 13 '09 at 19:59
  • I don't want to run it as a server - just as a client to send progress messages to an operational channel. – Scott Weinstein Aug 13 '09 at 20:12

2 Answers2

3

http://ps1.soapyfrog.com/2007/01/31/irc-chat-bot-and-monitor/

Marco Shaw
  • 1,117
  • 6
  • 13
  • Wow this was a long time ago! How would you use this to actually send a message to the channel? I can get it to trigger a block when a specific message is typed in the channel but I don't know how to correctly invoke _send or _notice. – Robin Feb 07 '14 at 19:59
1

This PowerShell command creates a bot named monitor that conencts to the given IRC server. It then specifies its body in a scriptblock, specifying to pipe all messages to the parent command. The output is then piped to Select-String (sls) to grep for "amazing."

.\Run-IrcBot.ps1 monitor ircserver channel { if ($message.Text) { "/pipe " + $message.Text } } -Silent | sls amazing

I was looking for a way to make IRC bots in PowerShell to run commands on demand. Didn't find something easy so I wrote my own little framework. A single-file download allows you to make fully-interactive IRC bots!

https://github.com/alejandro5042/Run-IrcBot

alejandro5042
  • 811
  • 1
  • 7
  • 17