Send an offline message from your cleint

Archived discussion about features (predating the use of Bugzilla as a bug and feature tracker)

Moderator: Moderators

Locked
RiPOFF
Posts: 8
Joined: 2003-06-13 12:33

Send an offline message from your cleint

Post by RiPOFF » 2003-10-16 22:19

like not a script or hub but like send a message locally on your client it watches the hub and when the user connects it sends the message

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-16 23:06

Can you explain that a little bit more?

Gratch06
Posts: 141
Joined: 2003-05-25 01:48
Location: USA

Post by Gratch06 » 2003-10-16 23:45

My thought is that this would actually be a really nice thing to have. Interpretation: I want to be able to "send" an offline message to a user, and when they came online, actually send it to them. Basically, store a message until the user comes online, then auto send it. It's useful if you have a short term memory or the user is hard to get a hold of. This is not the "best" method, as offline messaging (similar to ICQ) through the hub would be better, but this is easily the most feasible as it is self-contained in the client.

-Gratch06

joakim_tosteberg
Forum Moderator
Posts: 587
Joined: 2003-05-07 02:38
Location: Sweden, Linkoping

Post by joakim_tosteberg » 2003-10-17 09:30

Ok, now do I understand :D . It would realy be an nice feature.

Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

Post by Twink » 2003-10-17 20:18

i could see dc++ storing whatever you typed in a pm window and sending when it got a user online message however i suddenly thought if the user isn't online then you can't open a pm windows for them can you =D I'm guessing this might have to be a command line thing (like /pm user message)

Gratch06
Posts: 141
Joined: 2003-05-25 01:48
Location: USA

Post by Gratch06 » 2003-10-17 20:39

Twink wrote:i could see dc++ storing whatever you typed in a pm window and sending when it got a user online message however i suddenly thought if the user isn't online then you can't open a pm windows for them can you =D I'm guessing this might have to be a command line thing (like /pm user message)
On that note, I think it'd be really handy to have a /pm command...I try to avoid using mouse as much as possible, so if I could type /pm <user> and use oDC's Alt + # navigation system, I could theoretically go fully without a mouse and still chat through up to 9 windows (happy me).

Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

Post by Twink » 2003-10-17 21:59

I added this code in HubFrame around line 210. Seems to work for me

Code: Select all

			} else if (stricmp(s.c_str(), "pm")==0){
				string user = "", message = "";
				int spacePos = param.find(' ');

				if (spacePos != string::npos){
					user = param.substr(0,spacePos);
					message = param.substr(spacePos+1);
					if(user!=""&&message!=""){
						message = "<" + client->getNick() + "> " + message;
						client->privateMessage(user,message);					
					}else addLine("*** /pm UserName Message");	
					
				}else addLine("*** /pm UserName Message");

Gratch06
Posts: 141
Joined: 2003-05-25 01:48
Location: USA

Post by Gratch06 » 2003-10-17 22:45

Code looks good...I'll add it in tomorrow probably! Thanks Twink :)

Twink
Posts: 436
Joined: 2003-03-31 23:31
Location: New Zealand

Post by Twink » 2003-10-17 23:35

this could be extended to open a pm window if no message is specified.

Code: Select all

			} else if (stricmp(s.c_str(), "pm")==0){
				string user = "", message = "";
				int spacePos = param.find(' ');

				if (spacePos != string::npos){
					user = param.substr(0,spacePos);
					message = param.substr(spacePos+1);
				}else user = param;

				if(user!=""&&message!=""){
					message = "<" + client->getNick() + "> " + message;
					client->privateMessage(user,message);					
				}else if(user!=""){
					PrivateFrame::openWindow(ClientManager::getInstance()->getUser(user), m_hWndMDIClient, getTab());					
				}else addLine("*** /pm UserName Message");

GargoyleMT
DC++ Contributor
Posts: 3212
Joined: 2003-01-07 21:46
Location: .pa.us

Post by GargoyleMT » 2003-10-18 07:39

If you're going to do it that way, PLEASE use /msg, since that's the IRC way of doing it, and people are more used to that option.

Locked