rirc.rb
# regex check function
# this function uses the IRC_message object for message input
# inputs:
# 	- name
# 	- IRC_message object
# 	- array of admins [can be an empty array]
# 	- backlog array [can be an empty array]
# output: string
regex check function
this function uses the IRC_message object for message input
inputs:
name
IRC_message object
array of admins [can be an empty array]
backlog array [can be an empty array]
output: string
regex check function this function uses the IRC_message object for message input inputs : name IRC_message object array of admins [ can be an empty array ] backlog array [ can be an empty array ] output : string
def check_plugin(name, message, admins, backlog) 
 		if @plugins.length == 0
			return ""
		end
		if !plugin_loaded(name)
			return ""
		else
			if message.message.match(get_plugin(name).regex) and (get_plugin(name).chans.include? "any" or get_plugin(name).chans.include? message.channel)
				begin
					return get_plugin(name).script(message, admins, backlog) 
				rescue => e
					return "an error occured for plugin: #{name}"
				end
			end
		end
		return ""
	end
def check_plugin ( name , message , admins , backlog ) if @plugins . length == 0 return "" end if ! plugin_loaded ( name ) return "" else if message . message . match ( get_plugin ( name ) . regex ) and ( get_plugin ( name ) . chans . include? "any" or get_plugin ( name ) . chans . include? message . channel ) begin return get_plugin ( name ) . script ( message , admins , backlog ) rescue => e return "an error occured for plugin: #{name}" end end end return "" end
regex check function
this function uses the IRC_message object for message input
inputs:
 name
 IRC_message object
 array of admins [can be an empty array]
 backlog array [can be an empty array]
output: string
regex check function this function uses the IRC_message object for message input inputs : name IRC_message object array of admins [ can be an empty array ] backlog array [ can be an empty array ] output : string
#checks an individual plugin's (by name) regex against message # plugins use the IRC_message object
name
<not_specific>
message
<not_specific>
admins
<not_specific>
backlog
<not_specific>