user:SendData when user is Operator
 

News:

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

user:SendData when user is Operator

Started by HappyTheMan, 28 September, 2006, 20:19:30

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HappyTheMan

user:SendData("$To: "..user.sName.." From: "..BotName.." $"..msg)


Why do OPs don't get the <msg> while registred users do ?
What should I do to fix that ?
P.S. I don't want to use user:SendPM(FromNick, Data)
Thx a lot :))

Thor

Use this:
user:SendData("$To: "..user.sName.." From: "..BotName.." $<"..BotName.."> "..msg)

bastya_elvtars

Quote from: HappyTheMan on 28 September, 2006, 20:19:30
user:SendData("$To: "..user.sName.." From: "..BotName.." $"..msg)


Why do OPs don't get the <msg> while registred users do ?
What should I do to fix that ?
P.S. I don't want to use user:SendPM(FromNick, Data)
Thx a lot :))

Do you call it on NewUserConnected()?
Everything could have been anything else and it would have just as much meaning.

HappyTheMan

Quote from: Hungarista on 28 September, 2006, 20:39:15
Use this:
user:SendData("$To: "..user.sName.." From: "..BotName.." $<"..BotName.."> "..msg)


But I don't want to see <BotName>

Quote from: bastya_elvtars on 28 September, 2006, 20:52:31
Do you call it on NewUserConnected()?

No on ChatArrival

Quote from: Mutor on 28 September, 2006, 21:45:30
Why not? I see no reason not to use it.

I don't want the have the <BotName> at the begining of the message

bastya_elvtars

Quote from: HappyTheMan on 28 September, 2006, 23:31:04
I don't want the have the <BotName> at the begining of the message

That's not an option with the DC protocol. PMs must have sender's nick specified.
Everything could have been anything else and it would have just as much meaning.

HappyTheMan

it is specified: it is just not writen on the the begining of the message:
user:SendData("$To: "..user.sName.." From: "..BotName.." $"..msg)

HappyTheMan

I will try to be more explicit :)
The string user:SendData("$To: "..user.sName.." From: "..BotName.." $"..msg) works perfectly with non op users. For example when i send a cmd in pm to my chatroom:

Quote[02:14:39] <User> test

i get a responses like:

Quote[02:14:40]  *** Sorry but you are not allowed to chat here! Type !help to see how to use the ChatRoom

but when the user is an OP no response is shown in the PM window (but the pm, if it is a cmd, is still treated by the script)

Quote[02:14:39] <[OP]User> test

and.. no response


Now why do i want that ? Because sometimes its more beautiful to get:
Quote[02:14:40]  *** Sorry but you are not allowed to chat here! Type !help to see how to use the ChatRoom
than
Quote[02:14:40]  <ChatRoom> *** Sorry but you are not allowed to chat here! Type !help to see how to use the ChatRoom
Especially because the chat rooms on my hub have big names like: <#Antechamber_(GUEST-Chat)>

Of course i could use the SendPM command, it's not important. But why does it work with normal users but not with OPs ? It is not logical. I want to know why LOL

Posted on: 29 September 2006, 03:29:01
OK i am soooooo sorry... :(
I realized that the OP account used for testing was on a StrongDC v2.02 client which seems to be the origin of the problem.
It works fine with other clients

I really appologize for wasting your time....
please forgive me

Thank you all very much for your help :)
best regards

PPK

Quote from: HappyTheMan on 28 September, 2006, 23:31:04
I don't want the have the <BotName> at the begining of the message
Then some clients (DC++ 0.68 and never + mods of it if they don't have it fixed like CZDC) will not show this message because they need this nick  :'(
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

HappyTheMan

Yes. It looks you are right. Thank you for helping :)
I have fowarded this problem on the strongDC forum (bug section). If anyone is interested i can post the replies i got from them here.

PPK

Have luck with trying to change this in StrongDC++, i give you max 1 % chance that will be "fixed" ;D
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

HappyTheMan

You win!
Developer reply: "it's not our problem. Protocol specifies exact format of this command and different one won't be respected."

bastya_elvtars

Quote from: HappyTheMan on 03 October, 2006, 10:45:45
Developer reply: "it's not our problem. Protocol specifies exact format of this command and different one won't be respected."
And they are right.
Everything could have been anything else and it would have just as much meaning.

PPK

I am testing today some compatibility of PtokaX with Direct Connect client, and when i have it running then i tested what exact format of $To: command is accepted (if this client accept it then it means that it is Direct Connect protocol compatible) by this client.
This client accepting
$To: to_nick From: from_nick $message

to_nick must be nick used by client, and message not need to start with <nick> ... that means that newer DC++ and mods have bug ;D
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

bastya_elvtars

Quote from: PPK on 27 October, 2006, 02:01:55
to_nick must be nick used by client, and message not need to start with <nick> ... that means that newer DC++ and mods have bug ;D

Wow, why did they divert from the specification? :)
Everything could have been anything else and it would have just as much meaning.

PPK

"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

bastya_elvtars

Stupid question it was, huh? They change everything. Why not report this as a bug and submit a patch? :P
Everything could have been anything else and it would have just as much meaning.

Stormbringer

Hmmmmmmmm, HappyTheMan, you must know one thing, it will be more easy for you to make move the Everest to the pacific, than to see one of your request included in strongdc++ Mlol

SMF spam blocked by CleanTalk