This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

private message output to user

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Thanks speechless ill give this a try

1 more question how come ive been promoted to half op
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

blake wrote:Thanks speechless ill give this a try

1 more question how come ive been promoted to half op
It's the post-count levels given by this forum. Since its an eggdrop forum, the titles given are eggdrop related (owner doesnt mean owns this forum, it just means posted alot or smth). I guess you passed the magic number of posts which signifies your title or smth. Slennox knows the actual number these happen at and perhaps a few others ;)
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Kwl still a few probs

when i do spyadd user1 user2 i get this error

Code: Select all

_-6:34pm-_ <ChanGuardian> [18:34] -OperServ (services@chattersworld.co.uk)- Unknown command +++>.  "/msg OperServ HELP" for help.
Deleted +++> from script get this when i do spydel

Code: Select all

_-6:39pm-_ <ChanGuardian> [18:40] -OperServ (services@chattersworld.co.uk)- Unknown command --->.  "/msg OperServ HELP" for help.
deleted ---> from script now get

Code: Select all

_-6:41pm-_ <ChanGuardian> [18:41] -OperServ (services@chattersworld.co.uk)- Unknown command Malphas.  "/msg OperServ HELP" for help.
also the proc RecvSpyMessage is adding a user IRC but isnt outputting the messages still and everytime RecvSpyMessage is used its duplicating the user _-6:57pm-_ <ChanGuardian> [18:57] * Duplicate user record 'IRC'!
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

blake wrote:Kwl still a few probs

when i do spyadd user1 user2 i get this error

Code: Select all

_-6:34pm-_ <ChanGuardian> [18:34] -OperServ (services@chattersworld.co.uk)- Unknown command +++>.  "/msg OperServ HELP" for help.
Deleted +++> from script get this when i do spydel

Code: Select all

_-6:39pm-_ <ChanGuardian> [18:40] -OperServ (services@chattersworld.co.uk)- Unknown command --->.  "/msg OperServ HELP" for help.
deleted ---> from script now get

Code: Select all

_-6:41pm-_ <ChanGuardian> [18:41] -OperServ (services@chattersworld.co.uk)- Unknown command Malphas.  "/msg OperServ HELP" for help.
This is because you have set services, as +A as well. +A is used to detect who to sent putspyGuys messages to. You want to set services as +X only so that it's messages cannot be spoofed by those who are set to +A as nml375 has said before.
blake wrote:also the proc RecvSpyMessage is adding a user IRC but isnt outputting the messages still and everytime RecvSpyMessage is used its duplicating the user _-6:57pm-_ <ChanGuardian> [18:57] * Duplicate user record 'IRC'!
That part shouldnt happen, as that doesn't happen within the procedure I've pasted. The check for ![validuser "ircspy"] stops this from happening twice and only happens globally, once. Are you using the script "exactly" as I've pasted it? It's a complete script, you can...
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Yes i used it exactly as you put it it executes the spyadd spydel commands just dont output the contents recieved from IRC so i then thought well its not recieving anything from ircspy as it recieves it from IRC so changed the following

Code: Select all

if {![validuser "ircspy"]} {
  adduser ircspy "IRC!IRC@irc.chattersworld.co.uk"
  chattr ircspy +X
  setuser ircspy HOSTS "IRC!IRC@leaf.chattersworld.co.uk"
  setuser ircspy HOSTS "IRC!IRC@hub.chattersworld.co.uk"
}
to

Code: Select all

if {![validuser "IRC"]} {
  adduser IRC "IRC!IRC@irc.chattersworld.co.uk"
  chattr IRC +X
  setuser IRC HOSTS "IRC!IRC@leaf.chattersworld.co.uk"
  setuser IRC HOSTS "IRC!IRC@hub.chattersworld.co.uk"
}
Does exactly the same as above when spyadd user1 user2 is used bot got this notice

_-8:24pm-_ <ChanGuardian> [20:24] -NOTICE- *** malphas training_drone1: Added to your private spy list
_-8:24pm-_ <ChanGuardian> [20:24] -OperServ (services@chattersworld.co.uk)- Unknown command +++>. "/msg OperServ HELP" for help. thats on the partyline

when a message is sent by myself to training_drone1 this is on partyline
_-8:26pm-_ <ChanGuardian> [20:26] [IRC!IRC@hub.chattersworld.co.uk] [Malphas >> Training_Drone1] hello testing

but the bot is not outputting this to me or anyone else only message we get is the one you have set in the script

this is what happens when spydel user1 user2 is used

_-8:26pm-_ <ChanGuardian> [20:27] -NOTICE- *** malphas training_drone1: Deleted from your private spy list
_-8:27pm-_ <ChanGuardian> [20:27] -OperServ (services@chattersworld.co.uk)- Unknown command --->. "/msg OperServ HELP" for help.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

1) kill your bot
2) unsource all scripts related to this
3) start your bot
4) on your partyline, issue .deluser ircspy
5) kill your bot again
6) source the script I pasted "exatly" as it's pasted.
8) start your bot
9) it will now function correctly.

You have added your services as +AX. _ANY_ user set +A will receive every spy message regardless of who requested them. All users set to +A will see all the spy messages. If you want each individual user to only see the individual users they've requested, then this involves far too much work than I myself am interested in.

Note: If you added a user "IRC" to be known as services. You must .deluser IRC as well. Services can only be known to the script as a +X user for this to work. All your "spies" are set as +A.
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Done all you said its still not sending to a users and its still duplicating
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

I think I made a bummer with the msgm mask...
Try using {[*]*} instead of {[*]} as the mask should match the whole message, not only the beginning...
NML_375
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

nml375 wrote:I think I made a bummer with the msgm mask...
Try using {[*]*} instead of {[*]} as the mask should match the whole message, not only the beginning...
Thats still not made any difference nml375 thanks both for your help appreciate it
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Could you please issue the command ".binds msgm all" from the DCC chat partyline, and post the output here?
NML_375
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

nml375 wrote:Could you please issue the command ".binds msgm all" from the DCC chat partyline, and post the output here?

_-2:15pm-_ <ChanGuardian> Command bindings:
_-2:15pm-_ <ChanGuardian> TYPE FLGS COMMAND HITS BINDING (TCL)
_-2:15pm-_ <ChanGuardian> msgm X|- [*]* 2 RecvSpyMessage
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Oki.
There is one error in the regular expression I crafted, I forgot to add quantifiers for the sender and recipient atoms...

Code: Select all

if {[regexp -- {^\[([[:alnum:]]+) >> ([[:alnum:]]+)\] (.*)$} $text match sender recipient message]} {
Also, speechles' putspyGuys proc is flawed, in the sense that it assumes registered handles are identical to the nicknames the users use on irc, and that all +A handles are online. This could lead to messages leaking to a third party or malicious user.

At a minimum, hand2nick should be used, precautions taken to verify that this returns a valid nickname. Even so, this could send messages to the wrong people if your hostmasks are not properly setup, as hand2nick only returns the nickname of the first irc user that matches any hostmasks for this handle.
Personally, I'd go for the putlog (or putloglev) approach..
NML_375
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

nml375 wrote:Oki.
There is one error in the regular expression I crafted, I forgot to add quantifiers for the sender and recipient atoms...

Code: Select all

if {[regexp -- {^\[([[:alnum:]]+) >> ([[:alnum:]]+)\] (.*)$} $text match sender recipient message]} {
Also, speechles' putspyGuys proc is flawed, in the sense that it assumes registered handles are identical to the nicknames the users use on irc, and that all +A handles are online. This could lead to messages leaking to a third party or malicious user.

At a minimum, hand2nick should be used, precautions taken to verify that this returns a valid nickname. Even so, this could send messages to the wrong people if your hostmasks are not properly setup, as hand2nick only returns the nickname of the first irc user that matches any hostmasks for this handle.
Personally, I'd go for the putlog (or putloglev) approach..
This hasn`t worked eather not to worry thanks for your help guys appreciate it have come up with something else the module itself will output the contents to a channel so have got eggdrop to execute SPY add user1 user2 #ChattersWorld-Opers not what i wanted because i didn`t want opers flooded with the messages but its working

Code: Select all

proc cmd:spyadd {nick uhost hand arg} {
  set user1 [lindex [split $arg] 0]
  set user2 [join [lrange [split $arg] 1 end]]
  putquick "SPY add $user1 $user2 #ChattersWorld-Opers"
  puthelp "PRIVMSG Malphas $nick :is logging messages of $user1 & $user2"
  puthelp "PRIVMSG $nick :Logging pm`s of $user1 & $user2 to #ChattersWorld-Opers"
  puthelp "PRIVMSG $nick :Please remenber to delete pm check /ChanGuardian spydel $user1 $user2"
}

proc cmd:spydel {nick uhost hand arg} {
  set user1 [lindex [split $arg] 0]
  set user2 [join [lrange [split $arg] 1 end]]
  putquick "SPY del $user1 $user2#"
  puthelp "PRIVMSG Malphas $nick :is No longer logging messages of $user1 & $user2"
  puthelp "PRIVMSG $nick :No Longer logging messages of $user1 & $user2 To #ChattersWorld-Opers"
}
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Had another go at the script and this time its working as it should do thanks to both of you
Also, speechles' putspyGuys proc is flawed, in the sense that it assumes registered handles are identical to the nicknames the users use on irc, and that all +A handles are online. This could lead to messages leaking to a third party or malicious user.
if i were to remove this section would it then only message the user that has executed the command. (edited ok tried no it dont)
Post Reply