Permalink
Browse files

Some documentation.

  • Loading branch information...
1 parent 9d960ee commit 46c6858881cfc7d32849ee56f28f47699c33ea07 @Havvy Havvy committed Feb 5, 2013
Showing with 120 additions and 0 deletions.
  1. +86 −0 doc/Interfaces.txt
  2. +34 −0 doc/changelog.txt
View
@@ -0,0 +1,86 @@
+Interfaces
+
+IRCCommandHandler implements EventSubscriber, EventEmitter
+ parseMessage(IRCMessage)
+ emits(single-arbitrary-word, IRCCommand, NRC)
+
+IRCCommand
+ get sender
+ get args
+ get channel
+ get name
+ get isQuery
+
+IRCMessage
+ get receiver:NRC
+ Receiver of the message. The NRC object in most cases.
+ get prefix
+ If an IRC message starts with a :, the first word is called the prefix.
+ get sender
+ Sender of the message. Usually a Hostmask.
+ get type
+ Type of message. For example, 'privmsg' or 'quit'.
+ get name
+ Alias for type.
+ get args
+ Array of sent parameters.
+
+Actor
+ get actor: String
+ User performing the action.
+
+Channel
+ get channel: String
+
+IRCUserMessage implements IRCMessage, Actor
+IRCChannelUserMessage implements IRCMessage, Channel, Actor
+IRCChannelMessage implements IRCMessage, Channel
+IRCJoinPartMessage implements IRCChannelUserMessage
+
+IRCPrivMsgMessage implements IRCChannelUserMessage
+ get isQuery: boolean
+ True if message sent in a query.
+
+IRCQuitMessage implements IRCUserMessage
+ get reason: String
+
+IRCNickMessage implements IRCUserMessage
+ get newNick: String
+ New nick for the user changing nick.
+
+IRCChannelNamesMessage implements IRCChannelMessage
+ get users: List[String]
+ List of users in channel.
+
+NRC implements ModuleSubscriber, ModuleStorage, BiEventSubscriber, ConfigurationStorage, IRCClient
+
+ModuleSubscriber
+ require(Module)
+
+ModuleStorage
+ use(String): ModuleExports
+ isModule(String): boolean
+ getAllModuleNames(): List[String]
+ getAllModuleExports(): List[ModuleExports]
+
+ModuleExports
+ (Marker)
+
+BiEventSubscriber
+ on()
+ once()
+
+SimpleReadSocket extends EventSubscriber, EventEmitter
+ connect()
+ end()
+ emits('data', String)
+
+IRCSocket extends SimpleReadSocket
+ raw(String)
+ onConnect(Callback[])
+ onDisconnect(Callback[])
+
+Logger
+ input
+ output
+ error
View
@@ -0,0 +1,34 @@
+Changelog
+
+0.1.0:
+ * Rewrite of original nrc module.
+
+0.2.0:
+ * Module system added.
+
+0.3.0:
+ * Removal of the Protocols dependency. There's no logging at the moment.
+ * Modules are moved to their own object.
+ * BiSubscriber handlers the subscribing of events to either the
+ IRCMessageEmitter or the IRCCommandEmitter.
+ * Default NRC Modules are disabled (until the next version)
+
+0.4.0:
+ * Event listeners are no longer bound to 'nrc'.
+ * Message and Command objects use 'args' instead of 'params/parameters'.
+ This follows the same naming convention that node-irc uses.
+ * Default NRC Modules are refactored so that they return a function that
+ returns a module.
+ * ModuleSubscriber.requires() interface contract changed so that it takes
+ a one-arg constructor (that arg being the NRC object for the server the
+ module will be on) that returns a module.
+ * Module contract gains additional optional field for dependencies:
+ + dependencies(undefined U ModuleExports): List[String] U undefined
+
+Future:
+ * Executable tool to start a new NRC bot.
+ Ex: nrc ./my-server-config.json
+ * Examples of building a module and building a quick bot.
+ * Configuration Object passed to NRC constructor gains
+ optional 'modules' field. Absolute or relative URLs to modules that
+ are required.

0 comments on commit 46c6858

Please sign in to comment.