egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Help With Notes

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Road_to_Hell
Voice


Joined: 23 Aug 2008
Posts: 2

PostPosted: Sat Aug 23, 2008 7:08 pm    Post subject: Help With Notes Reply with quote

Hello,
i'm using added-on.tcl from your archive, but i have a problem with the function to send note to me when someone adds or delete user/ban.
I am the permanent owner of the bot.

When a friend add a user, the bot message me with this:
[00:54] <(Since1914> *** Note arrived for you.

But when i try to read it:
[00:54] <Road_to_Hell> .notes read all
[00:54] <(Since1914> You have no messages.

I can't read the note and don't know why Sad

I just need tcl who notes me every time when someone adds or deletes an user.

Please help and sorry for my bad english.

Here is the tcl:
Code:
# add-on.tcl
# Copyright (c)2000-2002 by funak <funak@funak.sk>
# Last update: 1.6.2002
#
#  Features:
#  -script adds an "Added" entry into the userfile for each user which were added
#   (ex. ADDED: by funak as luzer (23-07-2001@03:55))
#  -script adds a "Changed" entry into the userfile for each user which had changed
#   flags (ex. CHANGED: by funak (23-07-2001@03:55) +o #mychann)
#  -script sends a note to the users specified in the config file's notify-newusers
#   setting about new and deleted users
#   (ex. User funak deleted luzer (23-07-2001@03:55).)
#  -script adds (handle date@time) to bans' reason, so banned person can see who
#   set a ban on him (ex.[  1] *!*ident@hostmask (perm)
#                funak: reason (set by funak on 23-07-2001@03:55) )
#                     
# Based on - Added.tcl by Nils Ostbjerg <shorty@business.auc.dk> (C)Copyright (2000)
#
# Changelog:
# v1.0 - first relase
#      removed: hello, addhost
#      added: deluser, -user, -bot, notifying ppl about deleted users
# v1.2 - added: "changed" field, notifying ppl about new users
# v1.2 - added: "who banned" to bans' reason
#
# Any ideas, suggestions, bugreports, flames, cash, cars (I prefer new Skoda Superb),
# etc should be sent to me ;o))
# (contact info above).

set verzia v1.2

##########################################################################
# Bindings                                                               #
##########################################################################
unbind dcc m|m adduser *dcc:adduser
unbind dcc m|m deluser *dcc:deluser
unbind dcc m|- +user *dcc:+user
unbind dcc m|- -user *dcc:-user
unbind dcc t|- +bot *dcc:+bot
unbind dcc t|- -bot *dcc:-bot
unbind dcc m|m chattr *dcc:chattr
unbind dcc o|o +ban *dcc:+ban

bind dcc m|m adduser dcc:adduser
bind dcc m|m deluser dcc:deluser
bind dcc m|- +user dcc:+user
bind dcc m|- -user dcc:-user
bind dcc t|- +bot dcc:+bot
bind dcc t|- -bot dcc:-bot
bind dcc m|m chattr dcc:chattr
bind dcc o|o +ban dcc:+ban

##########################################################################
# Initilization                                                          #
##########################################################################
if {![info exists whois-fields]} {
    set whois-fields ""
}

# Add "Added" field
set ffound 0
foreach f2 [split ${whois-fields}] {
    if {[string tolower $f2] == [string tolower "ADDED"]} {
        set ffound 1
        break
    }
}
if {$ffound == 0} {
    append whois-fields " " "ADDED"
}

# Add "Changed" field
set ffound 0
foreach f2 [split ${whois-fields}] {
    if {[string tolower $f2] == [string tolower "CHANGED"]} {
        set ffound 1
        break
    }
}
if {$ffound == 0} {
    append whois-fields " " "CHANGED"
}
            
##########################################################################
# dcc:chattr start                                                       #
##########################################################################
proc dcc:chattr {hand idx paras} {
 set user [lindex $paras 0]
 set flags [lindex $paras 1]
 set on_chan [lindex $paras 2]
 if {[validuser $user]} {
  *dcc:chattr $hand $idx $paras
  setuser $user xtra CHANGED "by $hand ([strftime %d-%m-%Y@%H:%M]) $flags $on_chan"
 } else {
  *dcc:chattr $hand $idx $paras
 }
}
##########################################################################
# dcc:chattr end                                                         #
##########################################################################

##########################################################################
# dcc:add/deluser start                                                  #
##########################################################################
proc dcc:adduser {hand idx paras} {
    set user [lindex $paras 1]
    if {$user == ""} {
   if {[string index $paras 0] == "!"} {
       set user [string range [lindex $paras 0] 1 end]
   } else {
       set user [lindex $paras 0]
   }
    }
    if {[validuser $user]} {
   *dcc:adduser $hand $idx $paras
    } else {
   *dcc:adduser $hand $idx $paras
   if {[validuser $user]} {
            setuser $user xtra ADDED "by $hand as $user ([strftime %d-%m-%Y@%H:%M])"
      tellaboutnew $hand $user
   }
    }
}   

proc dcc:deluser {hand idx paras} {
    set user [lindex $paras 0]
    if {[validuser $user]} {
   *dcc:deluser $hand $idx $paras
      tellaboutdel $hand $user
    } else {
   *dcc:deluser $hand $idx $paras
    }
}   
##########################################################################
# dcc:add/deluser end                                                    #
##########################################################################

##########################################################################
# dcc:+/-user start                                                      #
##########################################################################
proc dcc:+user {hand idx paras} {
    set user [lindex $paras 0]
    if {[validuser $user]} {
        *dcc:+user $hand $idx $paras
    } else {
        *dcc:+user $hand $idx $paras
        if {[validuser $user]} {
            setuser $user xtra ADDED "by $hand as $user ([strftime %d-%m-%Y@%H:%M])"
      tellaboutnew $hand $user
        }
    }
}

proc dcc:-user {hand idx paras} {
    set user [lindex $paras 0]
    if {[validuser $user]} {
        *dcc:-user $hand $idx $paras
        tellaboutdel $hand $user
    } else {
        *dcc:-user $hand $idx $paras
    }
}
##########################################################################
# dcc:+/-user end                                                        #
##########################################################################

##########################################################################
# dcc:+/-bot start                                                       #
##########################################################################
proc dcc:+bot {hand idx paras} {
    set user [lindex $paras 0]
    if {[validuser $user]} {
        *dcc:+bot $hand $idx $paras
    } else {
        *dcc:+bot $hand $idx $paras
        if {[validuser $user]} {
            setuser $user xtra ADDED "by $hand as $user ([strftime %d-%m-%Y@%H:%M])"
      tellaboutnew $hand $user
        }
    }
}

proc dcc:-bot {hand idx paras} {
    set user [lindex $paras 0]
    if {[validuser $user]} {
        *dcc:-bot $hand $idx $paras
        tellaboutdel $hand $user
    } else {
        *dcc:-bot $hand $idx $paras
     }
}
##########################################################################
# dcc:+/-bot end                                                         #
##########################################################################

##########################################################################
# tellaboutnew start                                                     #
##########################################################################
proc tellaboutnew {hand user} {
    global notify-newusers
    foreach ppl ${notify-newusers} {
   sendnote $hand $ppl "User $hand added $user ([strftime %d-%m-%Y@%H:%M])."
    }
}   
##########################################################################
# tellaboutnew end                                                       #
##########################################################################

##########################################################################
# tellaboutdel start                                                     #
##########################################################################
proc tellaboutdel {hand user} {
    global notify-newusers
    foreach ppl ${notify-newusers} {
   sendnote $hand $ppl "User $hand deleted $user ([strftime %d-%m-%Y@%H:%M])."
    }
}   
##########################################################################
# tellaboutdel end                                                       #
##########################################################################

##########################################################################
# +ban start                                                             #
##########################################################################
proc dcc:+ban {handle idx arg} {
  if {$arg == ""} {
    *dcc:+ban $handle $idx $arg
    return 0
  }
  *dcc:+ban $handle $idx "$arg (set by $handle on [strftime %d-%m-%Y@%H:%M])"
}
##########################################################################
# +ban end                                                               #
##########################################################################

putlog "########################################"
putlog "#\002Add/Del/Change/Ban\002 addon $verzia by Funak#"
putlog "########################################"
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Fri Oct 10, 2008 3:32 pm    Post subject: Reply with quote

The script you've displayed seems fine. I would check the following:
1. The notes module is loaded.
2. The notes module settings are correct. (check for note file failure)
3. Check if there are any scripts loaded that alter/affect the notes. (i.e notes2.tcl including in the default eggdrop script directory)

I'd also check the output of .set errorInfo and possibly your logs for error messages relating to notes.
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
GiOrGoS
Voice


Joined: 22 Mar 2009
Posts: 5

PostPosted: Sun Mar 22, 2009 8:19 pm    Post subject: help Reply with quote

i suppose u have tried .notes read instead of .notes all read?
try the msg command as well if this fails /msg botnick notes pass read
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber