Menu

#30 Respond to commands via PM

open
nobody
PPF Core (13)
5
2012-11-25
2005-06-24
No

Trying to get !help on various commands, I ended up
littering the channel PPF was in with !help commands
when I'd prefer to send some of them directly via PM.
PPF ignores !commands in a PM.

Discussion

  • AllenJB

    AllenJB - 2006-02-24

    Logged In: YES
    user_id=1460921

    The problem here appears to be on line ~270 of PPF.java:

        \} else if \(isAuthed\(sender, AUTH\_ADMIN\)\) \{ 
            realMsg = message; 
        \} else \{ 
            return; 
        \}
    

    Here it basically says if the user isn't auth'd and is not
    sending a basic PPF command, ignore them. The code for
    sending PMs to plugins is below this (at the bottom of the
    onPrivateMessage method)

    To fix this you simply need to change this to:
    } else if (isAuthed(sender, AUTH_ADMIN)) {
    realMsg = message;
    // } else {
    // return;
    }

    It may also be an idea to check the other similar methods
    (onNotice, etc) to make sure that the same bug doesn't
    exist there.

     
  • Jonas Berlin

    Jonas Berlin - 2008-08-13

    Logged In: YES
    user_id=66259
    Originator: NO

    A simple workaround for this is to tell the bot to join a new channel where only you are on from before. In this "private channel" you can spam !help and other commands without disturbing others. You can use the "join #channel" command by PM to make the bot join a channel, and "leave #channel" for the opposite.

     

Log in to post a comment.

MongoDB Logo MongoDB