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.

/msg

Old posts that have not been replied to for several years.
Locked
w
whiteshark
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:

/msg

Post by whiteshark »

Hello i was looking for a script that when people /msg to the bot ,the bot log the user and paste it to the channel where he is on .

Thnx
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Code: Select all

bind msg -|- * pub:log

proc pub:log {nick host hand chan text} {
  if {($text != "")} {
    putserv "PRIVMSG $chan :$nick msg'ed me saying: $text."
    set $msg_file msg.db
    if {[file exist $msg_file} {
      set fp [open $msg_file a]
      put $fp [timestamp] $nick Channel: $chan Message: $text 
      close $fp
    }
  }
}
That should work

Code: Select all

set $msg_file msg.db
Make a file called msg.db in the eggdrop's home directory and it should work.
r0t3n @ #r0t3n @ Quakenet
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Re: /msg

Post by r0t3n »

amstelbier wrote:Hello i was looking for a script that when people /msg to the bot ,the bot log the user and paste it to the channel where he is on .

Thnx
Also, the last bit of what you said about the bot message the chan he is on. Do you mean the home channel for the bot, or the person who msg'ed the bot ?
r0t3n @ #r0t3n @ Quakenet
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

In your proc you magically find the users channel when the bot is messaged. On a MSG or MSGM bind no channel is ever passed.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

oh yea. I was copying my log script for my eggdrp. And just changed a few things. I need to know if he wants it to msg the bots home channel or does he mean the users channel. I guess the bots home channel i guess tho.
r0t3n @ #r0t3n @ Quakenet
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

you could just parse the text to any chan $nick is in

Code: Select all

foreach chan [channels] {
 if [onchan $nick $chan] {
  putserv "PRIVMSG $chan :$nick msg'ed me saying: $text."
 }
}
w
whiteshark
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:

Post by whiteshark »

yes i mean the home channel for the bot he is on

thnx for that script :) :P
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Just be wary with that script though. If for instance you add a new user to your bot and they /msg botname pass theirpassword it will relay their password to all the channels that the user is in and will compramise your bots security.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
w
whiteshark
Halfop
Posts: 62
Joined: Sun Jun 12, 2005 3:23 am
Location: netherlands
Contact:

Post by whiteshark »

yes thnx for that hint
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

What's [timestamp] :P
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

lol, indeed.
Locked