src/lua_irc.h
author Tero Marttila <terom@fixme.fi>
Sat, 23 May 2009 00:33:23 +0300
changeset 215 85863b89e38b
parent 116 92e71129074d
child 219 cefec18b8268
permissions -rw-r--r--
fix lua_thread_resume_state to not call lua_resume from a CFunction executing in the same state; lua_thread_done is now unprotected...
#ifndef LUA_IRC_H
#define LUA_IRC_H

/**
 * Defines lua wrappers for the irc_* objects
 */
#include "nexus_lua.h"
#include "lua_objs.h"
#include "irc_client.h"

/**
 * Our lua wrapper for irc_chan
 */
struct lua_chan {
    struct irc_chan *chan;
};

/**
 * Our lua wrapper for irc_net
 */
struct lua_net {
    struct irc_net *net;
};

/**
 * Our lua wrapper for irc_client
 */
struct lua_client {
    struct irc_client *client;
    
    /** Any defaults set using lua_client_set_defaults */
    struct irc_client_defaults defaults;
};

/**
 * Initialize the various lua_irc object types for the given lua state.
 *
 * Call in protected mode.
 */
void lua_irc_init (struct nexus_lua *lua);

#endif