Author Topic: user:SendData when user is Operator  (Read 5470 times)

0 Members and 1 Guest are viewing this topic.

Offline HappyTheMan

  • Member
  • ***
  • Posts: 25
  • Karma: +1/-0
user:SendData when user is Operator
« on: 28 September, 2006, 20:19:30 »
Code: [Select]
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 :))

PtokaX forum

user:SendData when user is Operator
« on: 28 September, 2006, 20:19:30 »

Offline Thor

  • Scripter
  • Lord
  • ******
  • Posts: 290
  • Karma: +45/-5
    • Hungarian Direct Connect Site
Re: user:SendData when user is Operator
« Reply #1 on: 28 September, 2006, 20:39:15 »
Use this:
Code: [Select]
user:SendData("$To: "..user.sName.." From: "..BotName.." $<"..BotName.."> "..msg)

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: user:SendData when user is Operator
« Reply #2 on: 28 September, 2006, 20:52:31 »
Code: [Select]
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.

Offline HappyTheMan

  • Member
  • ***
  • Posts: 25
  • Karma: +1/-0
Re: user:SendData when user is Operator
« Reply #3 on: 28 September, 2006, 23:31:04 »
Use this:
Code: [Select]
user:SendData("$To: "..user.sName.." From: "..BotName.." $<"..BotName.."> "..msg)

But I don't want to see <BotName>

Do you call it on NewUserConnected()?

No on ChatArrival

Why not? I see no reason not to use it.

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

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: user:SendData when user is Operator
« Reply #4 on: 28 September, 2006, 23:47:38 »
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.

Offline HappyTheMan

  • Member
  • ***
  • Posts: 25
  • Karma: +1/-0
Re: user:SendData when user is Operator
« Reply #5 on: 29 September, 2006, 02:00:59 »
it is specified: it is just not writen on the the begining of the message:
user:SendData("$To: "..user.sName.." From: "..BotName.." $"..msg)

Offline HappyTheMan

  • Member
  • ***
  • Posts: 25
  • Karma: +1/-0
Re: user:SendData when user is Operator
« Reply #6 on: 29 September, 2006, 02:36:06 »
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

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: user:SendData when user is Operator
« Reply #7 on: 29 September, 2006, 02:43:05 »
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

Offline HappyTheMan

  • Member
  • ***
  • Posts: 25
  • Karma: +1/-0
Re: user:SendData when user is Operator
« Reply #8 on: 29 September, 2006, 02:57:47 »
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.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: user:SendData when user is Operator
« Reply #9 on: 30 September, 2006, 06:46:37 »
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

Offline HappyTheMan

  • Member
  • ***
  • Posts: 25
  • Karma: +1/-0
Re: user:SendData when user is Operator
« Reply #10 on: 03 October, 2006, 10:45:45 »
You win!
Developer reply: "it's not our problem. Protocol specifies exact format of this command and different one won't be respected."

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: user:SendData when user is Operator
« Reply #11 on: 03 October, 2006, 14:25:34 »
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.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: user:SendData when user is Operator
« Reply #12 on: 27 October, 2006, 02:01:55 »
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
Code: [Select]
$To: to_nick From: from_nick $messageto_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

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: user:SendData when user is Operator
« Reply #13 on: 27 October, 2006, 11:17:36 »
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.

Offline PPK

  • Administrator
  • Emperor
  • *****
  • Posts: 1 475
  • Karma: +209/-22
  • PtokaX developer
Re: user:SendData when user is Operator
« Reply #14 on: 27 October, 2006, 16:17:07 »
I don't know...
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

Offline bastya_elvtars

  • Forum God
  • ****
  • Posts: 3 725
  • Karma: +173/-7
  • The rock n' roll doctor
    • The FreshStuff3 Site
Re: user:SendData when user is Operator
« Reply #15 on: 27 October, 2006, 20:06:28 »
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.

Offline Stormbringer

  • Fulll Member
  • ****
  • Posts: 73
  • Karma: +27/-17
Re: user:SendData when user is Operator
« Reply #16 on: 27 October, 2006, 22:46:27 »
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

PtokaX forum

Re: user:SendData when user is Operator
« Reply #16 on: 27 October, 2006, 22:46:27 »