add template script
This commit is contained in:
parent
b7992849fd
commit
37a047012b
1 changed files with 29 additions and 0 deletions
29
script/xmppbot.lua
Normal file
29
script/xmppbot.lua
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
function jidInitialised(account)
|
||||||
|
print("Account initialised")
|
||||||
|
print("From: "..jid(account))
|
||||||
|
print("Instance: "..jin(account))
|
||||||
|
end
|
||||||
|
function jidConnected(account)
|
||||||
|
print("Account connected")
|
||||||
|
print("From: "..jid(account))
|
||||||
|
print("Instance: "..jin(account))
|
||||||
|
end
|
||||||
|
function jidDisconnected(account)
|
||||||
|
print("Account disconnected")
|
||||||
|
print("From: "..jid(account))
|
||||||
|
print("Instance: "..jin(account))
|
||||||
|
end
|
||||||
|
function messageReceived(from, to, message)
|
||||||
|
print("Message received")
|
||||||
|
print("From: "..jid(from))
|
||||||
|
print("Instance: "..jin(from))
|
||||||
|
print("Message: "..message)
|
||||||
|
end
|
||||||
|
function presenceReceived(from, presenceType, statusType, statusText)
|
||||||
|
print("Presence received")
|
||||||
|
print("From: "..jid(from))
|
||||||
|
print("Instance: "..jin(from))
|
||||||
|
print("Presence Type: "..presenceType)
|
||||||
|
print("Status Type: "..statusType)
|
||||||
|
print("Status Text: "..statusText)
|
||||||
|
end
|
Loading…
Reference in a new issue