lua.c
changeset 152 0cf6c938ac03
parent 151 5d90caa7fb2c
child 153 8fba61f363a8
equal deleted inserted replaced
151:5d90caa7fb2c 152:0cf6c938ac03
  1474 }
  1474 }
  1475 
  1475 
  1476 /// mcabber.hook
  1476 /// mcabber.hook
  1477 /// Installs hook handler, returns an object, that you need to keep until
  1477 /// Installs hook handler, returns an object, that you need to keep until
  1478 /// hook handling is no more needed.
  1478 /// hook handling is no more needed.
  1479 /// A: string (hook name), hook function, integer (priority, optional)
  1479 /// A: string (hook name), hook function, integer (hook handler priority, optional)
  1480 /// R: userdata (hook object)
  1480 /// R: userdata (hook object)
  1481 static int lua_main_hook (lua_State *L)
  1481 static int lua_main_hook (lua_State *L)
  1482 {
  1482 {
  1483 	const char   *hook_name = luaL_checkstring (L, 1);
  1483 	const char   *hook_name = luaL_checkstring (L, 1);
  1484 	int           priority  = G_PRIORITY_DEFAULT;
  1484 	int           priority  = G_PRIORITY_DEFAULT;