Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Sending PM to specified user.

 
Post new topic   Reply to topic Printable version
 View previous topic  Not returning security packet? Post :: Post scrabble plugin  View next topic  
Author Message
TheOne
Newbie


Age:41
Gender:Gender:Male
Joined: Sep 04 2005
Posts: 17
Offline

PostPosted: Fri May 26, 2006 5:07 pm    Post subject: Sending PM to specified user. Reply to topic Reply with quote

Problem Solved

Could anyone help me out with a small command? I've been trying to make a command that will PM a specified user with a given message. Possibly to be later used as a warn feature. (!warn name:message)
Ex. !pm Testguy:Testmessage

So far, I've gotten it to send a PM to the player, but it's always a remote PM. I tried changing sendRemotePrivate to sendPrivate, but I get an error every time.

Any help would be greatly appreciated. Thanks.

Code: Show/Hide
      else if (c.check("pm"))
      {
         tolower(c.final);

         String pm = c.final;
         String name, message;
         char xname[256], xmessage[256];

         name = pm.split(':');
         message = pm.split(':');

         sprintf(xname, "%s", name);
         sprintf(xmessage, "%s", message);
         h->sendRemotePrivate(xname,xmessage);
         
//Just a test...
         //String k;
         //k += p->name;
         //k += " says: ";
         //k += xmessage;
         //h->sendRemotePrivate(xname,k.msg);
      }


Last edited by TheOne on Fri May 26, 2006 5:41 pm, edited 1 time in total
Back to top
View users profile Send private message Add User to Ignore List
Purge
Episode I > Eposide III
Jar-Jar is kool


Age:35
Gender:Gender:Male
Joined: Sep 08 2004
Posts: 2019
Offline

PostPosted: Fri May 26, 2006 5:13 pm    Post subject: Reply to topic Reply with quote

Why are you treating Command c as a char? Use it as a pointer in command.cpp.
Back to top
View users profile Send private message Add User to Ignore List
TheOne
Newbie


Age:41
Gender:Gender:Male
Joined: Sep 04 2005
Posts: 17
Offline

PostPosted: Fri May 26, 2006 5:41 pm    Post subject: Reply to topic Reply with quote

Actually, nevermind. I figured it out.
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Sat May 27, 2006 12:19 am    Post subject: Reply to topic Reply with quote

<cough> buffer overflow
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 149 page(s) served in previous 5 minutes.

phpBB Created this page in 0.459790 seconds : 28 queries executed (94.6%): GZIP compression disabled