Whisper
 

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

Whisper

Started by Snoris, 22 February, 2004, 18:51:31

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Snoris

Is there anyone who can help me with this??

I wanna have a command that makes it possible to "whisper" to other users..And no one can / Should se it =))..And no...
I dont wanna send an PM...Thats the point of the Whisper =))
U can skip that xtra thingy =))

EG.
+whisper Snortan Hi hi u ugly little moron =]
*This is not sent to the mainchat of course*

The user Snortan gets this in his Mainchat.....
The user Snoris whispered this to you : Hi hi u ugly little moron =]

Is there someone who can help me with this??

I've tried out some stuff but I'm a n00b as always =))

This is what i came up with =)

if (cmd=="+whisper") then
		arg=strsub(arg,1,strlen(arg)-1)
		SendToNick(arg,botname,"The user "..user.sName.." sent you this msg : "..arg.."") 
		user:SendData(botname,"You whispered to "..arg.."")
		return 1
		end

I'll hope there is SOMEONE who can help me with this =]

nErBoS

Hi,

Hope it helps...

--Requested by Snoris
--Made by nErBoS

Bot = "Whisper-Bot"

function Main()
frmHub:RegBot(Bot) 
end 

function DataArrival(user, data)

if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
	data=strsub(data,1,strlen(data)-1)
	s,e,cmd = strfind(data,"%b<>%s+(%S+)")
	if (cmd=="+whisper") then
		s,e,cmd,usrto,msg = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s+(.*)")
		local usr = GetItemByName(usrto)
		if (usr == nil) then
		user:SendData(Bot, "The user is'nt online.")
		return 1
		elseif (usrto ~= nil and msg ~= nil) then
		user:SendData(Bot,"You whispered to "..usrto.."")
		usr:SendData(Bot, "The "..user.sName.." whispered this to you : "..msg)
		return 1
		else
		user:SendData(Bot, "Syntax error, the command is +whisper  .")
		return 1
		end
	end
end
end

Best regards, nErBoS
--## nErBoS Spot ##--

BoJlk

that's a cool idea...but is this posible to make
OP's and Hub Muster to see the Whispered messages???
(for administrative purpices) 8)

plop

QuoteOriginally posted by BoJlk
that's a cool idea...but is this posible to make
OP's and Hub Muster to see the Whispered messages???
(for administrative purpices) 8)
spying you mean.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Herodes

Maybe you'd like to have a look at this one .. InterCom

BoJlk

#5
BTW it works like a Charm! 8)
but how can i unregister the BOT
so it won't be seen i the user list?
what line in the script do i delete/edit
(and how to make a description fot the bot too?)

And how do i Make it available in the !help commands
for User or for OPs

Herodes

change this part
function Main()
frmHub:RegBot(Bot)
end
to this
function Main()
-- frmHub:RegBot(Bot)
end

BoJlk

Doesn't matter u both ROCK!
Any way i was wondering if i type the [username]
the user name can contain character like "?" etc'
so i can't type it when i use the command!

Can it be done like RightClick option?

any suggestions?  ?(

BoJlk

#8
Syntax Error: expected;
  last token read: `-' at line 7 in file `...\PtokaX-0.326.TestDrive4\scripts\Whisper 1.1.lua'

  ?(

 :D
Sorry just added "-"
"--> Option for right click command"


Case Closed it's now Complette...

BoJlk

when i've done a reload in DC++
i recieve another RightClick Command!
so it's two now!...
i've done it three time now it's 5 commands in the rightClick option!  ?(

BoJlk

#10
QuoteOriginally posted by Mutor
When your done editing the user commands, restart your client.

Sorry that i need to ask this thought some terms are not formiliar to me...
Editing witch user command?
and restarting the DC++ software?

??????Hawk??????

hi m8    

try this  

added a Clear to the user commands

--Whisper 1.01
--by Mutor
--Request by Snoris
--
--Sends a "For your eyes only message" to another user in main.
--Added request by BoJlk  -> Option for right click command
--
--User Settings-------------------------------------------------------------------------------------
Comm = "+whisper"	-- Script Command
Bot = "[Sentry]"	-- Rename to your main Px bot
Confirmation = "1"	-- Show whisper confirmation [show to sender only] "1"=yes "0"=no
SendComm = "1"		-- Send user command [right click] "1"=yes "0"=no
--End User Settings----------------------------------------------------------------------------------
--
--$UserCommand 1 X  Where -> 1=Hub Menu 2=User Menu 3=Hub/User Menu 
--
function NewUserConnected(user)
	if SendComm == "1" then
		user:SendData("$UserCommand 255 |") -- clear
		user:SendData("$UserCommand 1 2 Whisper To User $<%[mynick]> "..Comm.." %[nick] %[line:Whisper-Message]||")
		user:SendData(" *** Notice :: Right click 'Whisper' command enabled ***")
	end
end

OpConnected = NewUserConnected

function DataArrival(user, data)
	s,e,cmd,who,msg = strfind(data, "%b<>%s+(%S+)%s+(%S+)%s+(.+)")
	if (cmd == Comm) then --and user.bOperator then -- Use this for Ops use only
	local nick = GetItemByName(who)
		if not nick then
			SendToNick(user.sName,Bot.." The user -> "..who.." is not online. Check your spelling.") 
			return 1 
		end
			nick:SendData(Bot,"The user "..user.sName.." whispered this to you : " ..msg)
				if Confirmation == "1" then
					SendToNick(user.sName,"Whisper sent...")
				end
	return 1
	end
	
end

BottledHate

QuoteOriginally posted by ??????Hawk??????

added a Clear to the user commands



if you have any other scripts sending right click
 commands, it has a good chance of erasing those.


-BH
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

BottledHate

#13
i hate long commands.. i'd make a shortcut for it...

(mod's 4 mutors last post above.)


- Comm = "+whisper"
+ Comm = {["+wisper"]= 1, ["+w"] = 1}

- if (cmd == Comm) then --and user.bOperator then -- Use this for Ops use only
+ if Comm[cmd] then --and user.bOperator then -- Use this for Ops use only


-BH
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

BoJlk

Me too i hate the long commands
If you misstyped it by accident... ?(
you'll have a nasty outcome  :D

so BottledHate you right
but where do i add those lines?

here?
--User Settings-------------------------------------------------------------------------------------
Comm = "+whisper"   -- Script Command
Bot = "[Sentry]"   -- Rename to your main Px bot
Confirmation = "1"   -- Show whisper confirmation [show to sender only] "1"=yes "0"=no
SendComm = "1"      -- Send user command [right click] "1"=yes "0"=no
--End User Settings----------------------------------------------------------------------------------
--

BottledHate

#15
sorry...

find the line with the "-" and replace it with the line that has the "+" next to it.

:D

- Comm = "+whisper"
+ Comm = {["+wisper"]= 1, ["+w"] = 1}


- if (cmd == Comm) then --and user.bOperator then -- Use this for Ops use only
+ if Comm[cmd] then --and user.bOperator then -- Use this for Ops use only

-BH
Homepage: www.bottledhate.webhop.org

Compiling  Lua scripts is LAME!!!!!

BoJlk

Great...!
Gonna Test it now...

BoJlk

#17
This  is a Cool Script

thanks to [Snoris]

BoJlk

Got an Error in Whisper...

QuotePtokaX-0.326.TestDrive4scriptsWhisper v1.2.lua
Syntax Error attempt to compare nil with number
Syntax Error table index is nil
Syntax Error table index is nil
Syntax Error table index is nil
Syntax Error table index is nil

BoJlk

Common No one has an answer for that error

Syntax Error: table index is nil

Considering this Script and for General Idea?

SMF spam blocked by CleanTalk