mirror of
https://github.com/weechat/weechat.git
synced 2026-06-30 23:06:38 +02:00
Revert "doc: add note about constants in lua, fix lua example (scripting guide)"
This reverts commit fad848bf7c.
This commit is contained in:
@@ -71,9 +71,6 @@ Lua
|
||||
^^^
|
||||
|
||||
* Funktionen werden im Format `weechat.xxx(arg1, arg2, ...)` ausgeführt
|
||||
// TRANSLATION MISSING
|
||||
* Constants in API are in fact functions, the returned value must be used as
|
||||
constant (not the function itself).
|
||||
|
||||
Tcl
|
||||
^^^
|
||||
@@ -334,7 +331,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
|
||||
----------------------------------------
|
||||
function timer_cb(data, remaining_calls)
|
||||
weechat.print("", "timer! data="..data)
|
||||
return weechat.WEECHAT_RC_OK()
|
||||
return weechat.WEECHAT_RC_OK
|
||||
end
|
||||
|
||||
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
|
||||
|
||||
@@ -70,8 +70,6 @@ Lua
|
||||
^^^
|
||||
|
||||
* Functions are called with `weechat.xxx(arg1, arg2, ...)`
|
||||
* Constants in API are in fact functions, the returned value must be used as
|
||||
constant (not the function itself).
|
||||
|
||||
Tcl
|
||||
^^^
|
||||
@@ -325,7 +323,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
|
||||
----------------------------------------
|
||||
function timer_cb(data, remaining_calls)
|
||||
weechat.print("", "timer! data="..data)
|
||||
return weechat.WEECHAT_RC_OK()
|
||||
return weechat.WEECHAT_RC_OK
|
||||
end
|
||||
|
||||
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
|
||||
|
||||
@@ -72,8 +72,6 @@ Lua
|
||||
^^^
|
||||
|
||||
* Les fonctions sont appelées par `weechat.xxx(arg1, arg2, ...)`
|
||||
* Les constantes dans l'API sont en fait des fonctions, la valeur retournée doit
|
||||
être utilisée comme constante (et non la fonction elle-même).
|
||||
|
||||
Tcl
|
||||
^^^
|
||||
@@ -335,7 +333,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
|
||||
----------------------------------------
|
||||
function timer_cb(data, remaining_calls)
|
||||
weechat.print("", "timer! data="..data)
|
||||
return weechat.WEECHAT_RC_OK()
|
||||
return weechat.WEECHAT_RC_OK
|
||||
end
|
||||
|
||||
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
|
||||
|
||||
@@ -72,9 +72,6 @@ Lua
|
||||
^^^
|
||||
|
||||
* Le funzioni sono chiamate con `weechat.xxx(arg1, arg2, ...)`
|
||||
// TRANSLATION MISSING
|
||||
* Constants in API are in fact functions, the returned value must be used as
|
||||
constant (not the function itself).
|
||||
|
||||
Tcl
|
||||
^^^
|
||||
@@ -339,7 +336,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
|
||||
----------------------------------------
|
||||
function timer_cb(data, remaining_calls)
|
||||
weechat.print("", "timer! data="..data)
|
||||
return weechat.WEECHAT_RC_OK()
|
||||
return weechat.WEECHAT_RC_OK
|
||||
end
|
||||
|
||||
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
|
||||
|
||||
@@ -63,9 +63,6 @@ Weechat.config_new_option(config, section, "name", "string", "description of opt
|
||||
==== Lua ====
|
||||
|
||||
* 関数は `weechat.xxx(arg1, arg2, ...)` のように呼び出してください。
|
||||
// TRANSLATION MISSING
|
||||
* Constants in API are in fact functions, the returned value must be used as
|
||||
constant (not the function itself).
|
||||
|
||||
==== Tcl ====
|
||||
|
||||
@@ -319,7 +316,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
|
||||
----------------------------------------
|
||||
function timer_cb(data, remaining_calls)
|
||||
weechat.print("", "timer! data="..data)
|
||||
return weechat.WEECHAT_RC_OK()
|
||||
return weechat.WEECHAT_RC_OK
|
||||
end
|
||||
|
||||
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
|
||||
|
||||
@@ -71,9 +71,6 @@ Lua
|
||||
^^^
|
||||
|
||||
* Funkcje są wywoływane za pomocą `weechat.xxx(arg1, arg2, ...)`
|
||||
// TRANSLATION MISSING
|
||||
* Constants in API are in fact functions, the returned value must be used as
|
||||
constant (not the function itself).
|
||||
|
||||
Tcl
|
||||
^^^
|
||||
@@ -330,7 +327,7 @@ Weechat.hook_timer(1000, 0, 1, "timer_cb", "test");
|
||||
----------------------------------------
|
||||
function timer_cb(data, remaining_calls)
|
||||
weechat.print("", "timer! data="..data)
|
||||
return weechat.WEECHAT_RC_OK()
|
||||
return weechat.WEECHAT_RC_OK
|
||||
end
|
||||
|
||||
weechat.hook_timer(1000, 0, 1, "timer_cb", "test")
|
||||
|
||||
Reference in New Issue
Block a user