Please convert to lua 5
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Please convert to lua 5

Started by Braum, 26 May, 2006, 09:35:22

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Braum

Hi, please convert to lua 5 thank

--[[

Client-side version 1.1a by jiten (4/10/2006)

Added: Hubname in the message - requested by Toobster?? (3/10/2006)
Added: Ignore table - requested by Toobster??;
Changed: Report is sent to PM - Toobster?? (4/10/2006).

Owner-Messenger-Bot made by Toobster?? 04/01/06
Filters mainchat for users calling your Nick
Then PM's the user from your Nick asking them to leave you a Message
Once they reply you get their pm
Also Bot PM's you telling you they called your nick in Mainchat
Like my script ? Then Plz help support my hub @ geordieland.no-ip.info

]]--

sBot = "Owner-Messenger" -- name of bot that will message you

-- Insert your trigger nicks below (lower-case)
tNicks = { ["toobster??"] = 1, ["toob"] = 1,  ["toobster"] = 1, ["tooby"] = 1, ["hubowner?"] = 1, }

-- Insert nicks you want to Ignore, such as Bots (lower-case)
tIgnore = { ["quiz-aster"] = 1, ["bot1"] = 1, }

dcpp:setListener( "chat", "ownermessenger",
function( hub, user, msg )
if hub:getOwnNick() ~= user:getNick() then
if not tIgnore[string.lower(user:getNick())] then
local msg = string.lower(msg)
for v in string.gfind(msg,"(%S+)") do
if tNicks[string.lower(v)] then
local sHubName = string.gsub(hub:getHubName(),"%s(%-.*)","")
hub:sendPrivMsgTo(user:getNick(),"<"..hub:getOwnNick()..
"> THIS IS AN AUTO RESPONSE MESSAGE \r\n\r\n I have been informed you are calling "..
"for me in mainchat, please leave a message for me here in pm and I will reply A.S.A.P.\r\n"..
"\r\n Your mainchat message was: " ..msg,0)
hub:injectPrivMsg(user:getNick(),hub:getOwnNick(),"<"..sBot.."> "..user:getNick()..
" is calling for you in mainchat in "..sHubName.." : "..msg)
end
end
end
end
end
)

DC():PrintDebug( "*** Loaded OwnerMessenger.lua ***" )

Markitos

This is a client-side script and its in lua 5...there is a hub-side script too.

SMF spam blocked by CleanTalk