Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Netham45

Pages: 1 ... 21 22 [23] 24 25 ... 123
331
OmnomIRC Development / Re: Plugin System Layout
« on: July 12, 2011, 11:29:59 pm »
I was being lazy with the options, and yea, your method of it does look like it'll work better.

332
OmnomIRC Development / Plugin System Layout
« on: July 12, 2011, 11:14:32 pm »
I've been toying with the idea of a plugin system for quite some time for both client and server, and eeems was asking me about it earlier, so I thought I'd document some of what I came up with.

Client-sided plugins(for the web client, javascript based):

3 return values:
PLUGIN_CONTINUE - Continue parsing through all plugins, and allow OmnomIRC to display this message normally
PLUGIN_NO_OUTPUT - Continues parsing through all plugins, but causes OmnomIRC not to display the message
PLUGIN_BREAK - stops at this plugin, does not reach any others

Message types:
OnLoad - Fired when OmnomIRC loads - No vars

OnJoin - Fired when someone joins the current channel - Name, Channel
OnPart - Fired when someone parts the current channel - Name, Reason, Channel
OnQuit - Fired when someone quits the current channel - Name, Reason
OnKick - Fired when someone is kicked from the current channel - KickedName, KickerName, Reason, Channel
OnMode - Fired when someone changes modes in the current channel - Name, Modes, Channel
OnTopic - Fired when someone changes the topic in the current channel - Name, Topic, Channel

OnMessage - Fired when someone sends a message in the current channel - Name, Message, Channel
OnMessageHighlight - Fired when someone sends a message that highlights the user in the current channel - Name, Message, Channel
OnAction - Fired when someone sends an action in the current channel - Name, Message, Channel
OnActionHighlight - Fired when someone sends an action that highlights the user in the current channel - Name, Message, Channel

The layout of the javascript plugins will be something like this:
Code: [Select]
function pluginInfo()
{
     pluginName = "OnJoin Example";
     pluginVersion = "0.01";
     minOmnomIRCVersion = "2.2";
}
function OnJoin()
{
     alert(name1 + " has joined " + channel);!
     return PLUGIN_CONTINUE;
}
function Options()
{
     document.write('<a href="#" onclick="DoThis();">Option!</a><br/>');
}
function DoThis()
{
     alert("You clicked my option!");
}
registerPlugin();
registerOnJoin();
registerOptions();


There will be an option in the options page for loading them, and they will be able to output options to the options page. The plugins themselves will be largely responsible for managing their cookies and own options.

Here's what a mockup of the OmnomIRC-side loading code will be:
Code: [Select]
function loadPlugins()
{
     for (var i=0;i<pluginList.length;i++)
     {
          //Warning: PSEUDO CODE!
          scrtag = new script;
          scrtag.src = pluginList[i];
          body.appendChild(scrtag);
     }
}
function registerPlugin()
{
     if (minOmnomIRCVersion > OmnomIRCVersion) alert("NOEP.");
     loadedPluginList[] = Array(pluginName,pluginVersion,minOmnomIRCVersion);
}

function registerOnJoin()//Replicate for all other events
{
     onJoinPlugins[] = Array(loadedPluginList.length,OnJoin);
}

function doOnJoin(name,channel)
{
     name = name;
     channel = channel;
     var output = true;
     for (var i=0;i<onJoinPlugins.length;i++)
     {
          var result = (onJoinPlugins[i][1])();
          if (result != PLUGIN_CONTINUE) output=false;
          if (result == PLUGIN_BREAK) break;
     }
     return output;
}

Server-side plugins!
They will have the same events for the time being.
Code: [Select]
//OmnomIRC v2.2 OnJoin,OnLoad
//Example Plugin
//0.01

function OnJoin()
{
     global $name,$channel;
     die("$name has joined $channel!");
     return PLUGIN_BREAK;
}

function OnLoad()
{
     echo "BLARG!!!!!!!!!!!!!!";
     return PLUGIN_CONTINUE;
}

And, for the server to load them (this has to be done each page run, I'm not entirely sure how efficient it will be)
This is pseudocode too.
Code: [Select]
foreach ($file in $directory)
{
     include($file);
     if (doesOnLoad($file))
     {
          OnLoad();
     }
     if (doesOnJoin($file))
     {
          OnJoin();
     }
}
etc...


Thoughts/comments? :D

333
OmnomIRC Development / Re: target="_top"
« on: July 12, 2011, 09:53:28 pm »
really? What browser is it case sensitive in?

334
Site Feedback and Questions / Re: omniurl.tk is down?
« on: July 10, 2011, 05:56:11 pm »
no, I had a blurb explaining what it did, and saying that they shouldn't be stupid and stop it.

335
Site Feedback and Questions / Re: omniurl.tk is down?
« on: July 10, 2011, 04:28:41 pm »
I resubmitted it for verification. Here's what they sent me, btw:

Quote

Dear netham45,

The Dot TK Abuse and Copyright Infringement department has visited your website today.

Unfortunately we have to say that today we cancelled your domain OMNIURL.TK.
No-one can re-register this domain again at this stage. This may change in the future.

The reason for the cancellation is that the website address you used for your Dot TK domain name was not accessible or did not follow the guidelines set in our terms and conditions.

If you want to have us elevate the content verification with one of Dot TK's senior content specialists you can press this link.

<snip>

If you are in doubt, please review our terms and conditions, which can be found at: http://www.dot.tk/en/doc_tcfree_v350.pdf

We thank you for using Dot TK.

Dot TK Abuse / Copyright Infringement team

They seem to think that I'm abusing their service when there's absolutely no problem with what I'm doing. :|

336
Site Feedback and Questions / Re: omniurl.tk is down?
« on: July 10, 2011, 04:23:13 pm »
no, .tk decided to be rediculious and deactivate my domain because they completely fail to properly check if it's in violation of their usage policies or not.

337
OmnomIRC Development / Re: Repeated Messages
« on: July 06, 2011, 04:00:21 pm »
If you guys can get me the timestamps off of both messages and your timezone, I can go check the logs to see if I see anything different about them.

I have a suspicion it has to deal with parental filters, I've had issues with those before.

338
Minecraft Discussion / Re: Omnimaga minecraft server
« on: July 06, 2011, 07:18:57 am »
Offline servers are a security issue. I could sign on as whoever I wanted on one.

Also, as far as servers go, I started working on an RPG mod for a server (something customized to a specific server) back on 1.2, anyone interested in mayhaps helping me continue it?

339
Gaming Discussion / Re: Anything illegal in what I want to do?
« on: July 06, 2011, 07:15:47 am »
As far as I can tell, that source code is copyrighted 1984 (END.S in MSPACMAN.zip), which puts it within legal copyright until 2079 (SOURCE)

copyright laws are too long. :|

340
OmnomIRC Development / Re: Duplicated nicks in user list
« on: July 06, 2011, 12:02:26 am »
OmnomIRC aims to update realtime, I believe Omnimaga's is 15 or 30 minutes.

341
News / Re: Omnimaga gets a teamspeak server
« on: July 04, 2011, 01:18:08 am »
Featuring Genolo, and the official LOPN support chatroom!

342
Yay oppressive governmental bills!

It'll never take effect, though, 99% of videos featuring gameplay fall under fair use.

343
Miscellaneous / Re: What is your signature?
« on: July 02, 2011, 02:07:10 pm »
My sig is pretty damn awesome, that's what it is!

344
News / Re: FLASHY - 83/4 series boot code modification
« on: July 02, 2011, 01:53:22 pm »
Well, OS validation is good to a point, it ensures that nothing to wipe the bootpages randomly gets written to a privlidged page on corruption. :P

345
OmnomIRC Development / Re: Duplicated nicks in user list
« on: July 02, 2011, 01:52:10 pm »
Somewhere I'm getting an issue where I'm adding a nick but not removing it properly. I've looked over it, but I haven't found it yet. :|

Pages: 1 ... 21 22 [23] 24 25 ... 123