PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: AdamLC on 18 November, 2003, 00:03:37

Title: !say command
Post by: AdamLC on 18 November, 2003, 00:03:37
Just two things i ask of u guys b4 i leave u all alone :P

1. How can i configure dc++k to kick faked sharers (i am too dumb too work it out for myself)

2. You may have seen it but in Y-Hub you can use the !SAY . What it does is posts a message in main chat to make it look like that user has typed a message. I would like a prokax script version if possible. Also the !say command cant be seen, just the message to come up if u get me :P


Thanks Adam
Title:
Post by: AdamLC on 18 November, 2003, 00:09:40
Oh yeh and if possible the bot cant be reged in the hub. Cause my bot list is getting bigger. Thanx guys
Title:
Post by: Belial on 18 November, 2003, 00:25:41
-- NickAbuse Script By   [aXs] Wellx   13/5-03
-- !say  = Sends a message in Main Chat to all with as the sender
-- !saypm  = Sends a PM to a user from

function DataArrival(user,data)
if( strsub(data, 1, 1) == "<" ) then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
end
if (cmd=="!say") then
local s,e,cmd,From,Text = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s*(.*)" )
SendToAll(From,Text)
return 1
elseif (cmd=="!saypm") then
local s,e,cmd,From,To,Text = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s+(%S+)%s+(.*)")
SendPmToNick(To,From,Text)
return 1
end
end
Title:
Post by: AdamLC on 18 November, 2003, 00:33:34
Very Good just what i wanted. But everyone can use this script, i have tested it. Would it be possible for only masters to use this script?
Title:
Post by: kepp on 18 November, 2003, 00:55:41
---------------------------------------------
--# Say command made by kepp
--# Request from AdamLC
--# Enjoy
---------------------------------------------
      function DataArrival(user, data)
            if strsub(data,1,1) == "<" or strsub(data,1,4) == "$To:" then
      data=strsub(data,1,strlen(data)-1)
            s,e,cmd,Name,rsn = strfind(data,"%b<>%s+(%S+)%s+(%S+)%s+(.*)")
       if user.iProfile == 0 then

            if (cmd=="+say") or (cmd=="!say") or (cmd=="?say") then
       SendToAll(Name, rsn) return 1
    end
  end
 end
end

I don't think this is a nice function.
But here you go :P

?say [BBB]Micke
!say [BBB]Micke
+say [BBB]Micke

Enjoy
Title:
Post by: kepp on 18 November, 2003, 01:06:25

---------------------------------------------
--# Say command made by kepp
--# Request from AdamLC
--# Enjoy
--# Also in PM, idea from [aXs] Wellx
---------------------------------------------
function DataArrival(user, data)
if strsub(data,1,1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd,Name,rsn = strfind(data,"%b<>%s+(%S+)%s+(%S+)%s+(.*)")
if user.iProfile == 0 then

if (cmd=="+say") or (cmd=="!say") or (cmd=="?say") then
SendToAll(Name, rsn) return 1

elseif (cmd=="+saypm") or (cmd=="!saypm") or (cmd=="?saypm") then
s,e,cmd,to,from,msg = strfind(data,"%b<>%s+(%S+)%s+(%S+)%s+(%S+)%s+(.*)")
SendPmToNick(to,from,msg) return 1
end
end
end
end

For Masters only.

!saypm
+saypm
?saypm
Title:
Post by: AdamLC on 18 November, 2003, 08:48:54
Thanks Kepp this script is great, just what i wanted  :P
Title:
Post by: kepp on 18 November, 2003, 15:56:17
Np :)