Python Plugin Wrapper
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Python Plugin Wrapper for AdiIRC


This is a plugin wrapper for AdiIRC using IronPython and the new AdiIRC APIv2 to allow python scripting in AdiIRC.


  • Download
  • Unzip it to your config folder, usually C:\Users\username\AppData\Local\AdiIRC\Plugins
  • Go to Menubar -> File -> Plugins, select PyWrapper.dll, then click the Load button.


To create Python scripts, go to Menubar -> Tools -> Edit Plugin Scripts -> Python Wrapper.

APIv2 documentation can be found at, all the python events uses the same names and parameters as in the docs,


def OnLoad():
	# print a message when the script is loaded.
	pluginHost.ActiveIWindow.OutputText("Loaded script " + scriptFile)

	# add a hook for the command /testpy, notice it calls "plugin." instead of "pluginHost."

	# add a hook for the command /testeval

	# add a hook for the command /testcmd

	# add a hook for the command /listnicks

def OnRegisteredCommand(e):
	parm = e.Command.split(" ")
	if parm[0] == "/testpy":
		 # if the typed command was /testpy, print a message.
        	    pluginHost.ActiveIWindow.OutputText("You typed /testpy " + " ".join(parm[1:]))

	elif parm[0] == "/testeval":
		# if the typed command was /testeval, try to evaluate "$me" 
		pluginHost.ActiveIWindow.OutputText("$me evaluates to " + pluginHost.ActiveIWindow.Evaluate("$me", ""))

	elif parm[0] == "/testcmd":
		# send a "/echo -ag Hello world" command to the active window.
		pluginHost.ActiveIWindow.ExecuteCommand("/echo -ag Hello World")

	elif parm[0] == "/listnicks":
		# if the typed command was /listnicks, print all nicks in the channel
		for value in pluginHost.ActiveIWindow.GetUsers:
# set a global variable
joined = 0

def OnChannelJoin(e):
	# if this is my nick joining
	if e.User.Nick == e.Channel.Server.Nick:
			# update the global variable.
			global joined
			joined = joined + 1

			# print number of times joined a channel while the script was running.
			e.Channel.OutputText("I have joined a channel " + str(joined) + " times")
		# print a message to the server window.
		e.Channel.OutputText(e.User.Nick + " just joined " + e.Channel.Name)

	# don't do anything to the original message.
	return EatData.EatNone
def OnChannelPart(e):
	# eat/hide the part message.
	return EatData.EatText
import clr


from System import EventHandler
from System.Windows.Forms import ToolStripMenuItem

def OnMenu(e):
	if e.MenuType == MenuType.Channel:
		menuItem = ToolStripMenuItem("Example Menu Item")
		menuClickedHandler = EventHandler(MenuClicked)
		menuItem.Click += menuClickedHandler

def MenuClicked(source, args):
	pluginHost.ActiveIWindow.OutputText("Menu item clicked")