equal
deleted
inserted
replaced
380 |
380 |
381 #ifdef LLM_CONNECTION_ENABLE |
381 #ifdef LLM_CONNECTION_ENABLE |
382 /// main.connection |
382 /// main.connection |
383 /// Returns lightuserdata of mcabber's loudmouth connection. |
383 /// Returns lightuserdata of mcabber's loudmouth connection. |
384 /// This can be very useful with lua-loudmouth, and not much otherwise. |
384 /// This can be very useful with lua-loudmouth, and not much otherwise. |
385 /// R: lightuserdata |
385 /// R: lightuserdata or nil |
386 static int lua_main_connection (lua_State *L) |
386 static int lua_main_connection (lua_State *L) |
387 { |
387 { |
388 lua_pushlightuserdata (L, lconnection); |
388 if (xmpp_is_online ()) |
|
389 lua_pushlightuserdata (L, lconnection); |
|
390 else |
|
391 lua_pushnil (L); |
389 return 1; |
392 return 1; |
390 } |
393 } |
391 #endif |
394 #endif |
392 |
395 |
393 /// main.print_info |
396 /// main.print_info |