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 

user profile script
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Fri Oct 30, 2009 11:34 am    Post subject: Reply with quote

Code:
# regexp for !setup, !update, !remove, !flush commands (default, only small and BIG letters are allowed)
# in this script (profile-0.*.tcl), all profiles names are in 'lower case', but we have to allow big chars because someone can write !setup MyNiCk or something, otherwise script will make 'mynick' ;)
set int_bind_regexp {^[a-zA-Z]+$}


change to:
Code:
set int_bind_regexp {^[a-zA-Z0-9\-]+$}


and u will be able to write sk-4...
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Fri Oct 30, 2009 12:02 pm    Post subject: Reply with quote

Tomekk but this script don't gave voice to users in profile list?
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Fri Oct 30, 2009 12:07 pm    Post subject: Reply with quote

this is not implemented because this is not authentication type script,
just simple profile information...
Back to top
View user's profile Send private message Visit poster's website
Nor7on
Op


Joined: 03 Mar 2007
Posts: 185
Location: Spain - Barcelona

PostPosted: Fri Oct 30, 2009 12:08 pm    Post subject: Reply with quote

can u add this option?

edit/
i add this option.

but maybe you can insert some system anti-flood/anti-lag, the command show !view or !setup every 1min.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
sk-4
Halfop


Joined: 06 Oct 2007
Posts: 51

PostPosted: Fri Oct 30, 2009 10:07 pm    Post subject: Reply with quote

i changed the set int_bind_regexp {^[a-zA-Z0-9\-]+$} to


set int_bind_regexp {^[\x41-\x7D][-\d\x41-\x7D]+$} and now it work good with nick with special character.. i cant find the way to edit the key..its to long.. any idea how to make it small maybe 4 or 5 .ex ab123 az231
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Sat Oct 31, 2009 2:32 pm    Post subject: Reply with quote

Nor7on wrote:
can u add this option?

edit/
i add this option.

but maybe you can insert some system anti-flood/anti-lag, the command show !view or !setup every 1min.


don't think so.. not now for sure, maybeee in da future...

sk-4 wrote:
i changed the set int_bind_regexp {^[a-zA-Z0-9\-]+$} to


set int_bind_regexp {^[\x41-\x7D][-\d\x41-\x7D]+$} and now it work good with nick with special character.. i cant find the way to edit the key..its to long.. any idea how to make it small maybe 4 or 5 .ex ab123 az231


Do you mean registration key, 4c4712a4141d261ec0ca8f9037950685 etc etc? Its to long for you?
Back to top
View user's profile Send private message Visit poster's website
sk-4
Halfop


Joined: 06 Oct 2007
Posts: 51

PostPosted: Sat Oct 31, 2009 3:02 pm    Post subject: Reply with quote

wc back bro..yup this key 4c4712a4141d261ec0ca8f9037950685 etc etc is to long any way u can make it shorter like 12345 or ab123
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Sun Nov 01, 2009 7:43 am    Post subject: Reply with quote

sk-4 wrote:
wc back bro..yup this key 4c4712a4141d261ec0ca8f9037950685 etc etc is to long any way u can make it shorter like 12345 or ab123


interviewer-addon-0.1.tcl ver. for profile-0.5.tcl

Code:
# Author: tomekk                                                                                   
# e-mail:  tomekk/@/oswiecim/./eu/./org                                                             
# home page: http://tomekk.oswiecim.eu.org/                                                         
#                                                                                                   
# Version 0.1
#
# This file is Copyrighted under the GNU Public License.
# http://www.gnu.org/copyleft/gpl.html

# config header and procs moved to profile-0.*.tcl

################################ high wizardry begins ######################################
############################################################################################
if {[string match "*s*" $int_proc_bind]} {
   bind pub -|- $int_bind(setup) int_proc_setup
}

if {[string match "*u*" $int_proc_bind]} {
   bind pub -|- $int_bind(updatee) int_proc_update
}

if {[string match "*d*" $int_proc_bind]} {
   bind pub -|- $int_bind(delete) int_proc_remove
}

if {[string match "*r*" $int_proc_bind]} {
   bind pub -|- $int_bind(release) int_proc_release
}

if {[string match "*e*" $int_proc_bind]} {
   bind pub o|o $int_bind(sessions) int_proc_sessions
}

if {[string match "*f*" $int_proc_bind]} {
   bind pub o|o $int_bind(flussh) int_proc_flush
}

if {[string match "*p*" $int_proc_bind]} {
   bind msgm -|- "*" int_proc_msgm
}

if {[string match "*a*" $int_proc_bind]} {
   bind part -|- "*" int_proc_part
}

if {[string match "*i*" $int_proc_bind]} {
   bind sign -|- "*" int_proc_sign
}

if {[string match "*l*" $int_proc_bind]} {
   bind splt -|- "*" int_proc_splt
}

if {[string match "*k*" $int_proc_bind]} {
   bind kick -|- "*" int_proc_kick
}

if {[string match "*n*" $int_proc_bind]} {
   bind nick -|- "*" int_proc_nick
}

setudef flag intadd

set int_global_nicks [list]
set int_global_uhosts [list]
set int_global_pnames [list]
set int_global_questions_idx [list]
set int_global_answers_mode [list]
set int_global_modes [list]
set int_global_update_mode [list]

proc putnq { data } {
   putdccraw 0 [string length "$data\n"] "$data\n"
}

proc int_check_global_n_u { nick uhost } {
   global int_global_nicks int_global_uhosts

   set new_n_u_state 0

   if {([lsearch $int_global_nicks $nick] > -1) && \
      ([lsearch $int_global_uhosts $uhost] > -1)} {
            set new_n_u_state 1
   }

   return $new_n_u_state
}

proc int_check_global_pn { profile_name } {
   global int_global_pnames

   set new_pn_state 0

   if {[lsearch $int_global_pnames $profile_name] > -1} {
      set new_pn_state 1
   }

   return $new_pn_state
}

proc int_nick_to_profile { nick } {
   global int_global_nicks int_global_pnames

   set profile_name ""

   set nick_idx [lsearch $int_global_nicks $nick]

   set profile_name [lindex $int_global_pnames $nick_idx]

   return $profile_name
}

proc int_nick_to_idx { nick } {
   global int_global_nicks

   set nick_idx [lsearch $int_global_nicks $nick]

   return $nick_idx
}

proc int_nick_to_answer_mode { nick } {
   global int_global_answers_mode

   set nick_answer_mode ""

   set nick_global_idx [int_nick_to_idx $nick]

   set nick_answer_mode [lindex $int_global_answers_mode $nick_global_idx]

   return $nick_answer_mode
}

proc int_nick_to_update_mode { nick } {
   global int_global_update_mode

   set nick_update_mode ""

   set nick_global_idx [int_nick_to_idx $nick]

   set nick_update_mode [lindex $int_global_update_mode $nick_global_idx]

   return $nick_update_mode
}

proc int_nick_to_mode { nick } {
   global int_global_modes

   set nick_int_mode ""

   set nick_global_idx [int_nick_to_idx $nick]

   set nick_int_mode [lindex $int_global_modes $nick_global_idx]

   return $nick_int_mode
}

proc int_switch_answer_mode { nick } {
   global int_global_answers_mode

   set nick_global_idx [int_nick_to_idx $nick]

   set user_answer_mode [lindex $int_global_answers_mode $nick_global_idx]

   if {$user_answer_mode == 0} {
      set int_global_answers_mode [lreplace $int_global_answers_mode $nick_global_idx $nick_global_idx 1]
   } {
      set int_global_answers_mode [lreplace $int_global_answers_mode $nick_global_idx $nick_global_idx 0]
   }
}

proc int_switch_update_mode { nick } {
   global int_global_update_mode

   set nick_global_idx [int_nick_to_idx $nick]

   set user_update_mode [lindex $int_global_update_mode $nick_global_idx]

   if {$user_update_mode == 0} {
      set int_global_update_mode [lreplace $int_global_update_mode $nick_global_idx $nick_global_idx 1]
   } {
      set int_global_update_mode [lreplace $int_global_update_mode $nick_global_idx $nick_global_idx 0]
   }
}

proc int_incr_nick_idx { nick } {
   global int_global_questions_idx

   set nick_global_idx [int_nick_to_idx $nick]

   set nick_question_idx [expr [lindex $int_global_questions_idx $nick_global_idx] + 1]

   set int_global_questions_idx [lreplace $int_global_questions_idx $nick_global_idx $nick_global_idx $nick_question_idx]
}

proc int_set_nick_idx { nick new_idx } {
   global int_global_questions_idx

   set nick_global_idx [int_nick_to_idx $nick]

   set int_global_questions_idx [lreplace $int_global_questions_idx $nick_global_idx $nick_global_idx $new_idx]
}

proc int_nick_for_delete { nick } {
   global int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_mode

   set nick_global_idx [int_nick_to_idx $nick]

   set int_global_nicks [lreplace $int_global_nicks $nick_global_idx $nick_global_idx]
   set int_global_uhosts [lreplace $int_global_uhosts $nick_global_idx $nick_global_idx]
   set int_global_pnames [lreplace $int_global_pnames $nick_global_idx $nick_global_idx]
   set int_global_questions_idx [lreplace $int_global_questions_idx $nick_global_idx $nick_global_idx]
   set int_global_answers_mode [lreplace $int_global_answers_mode $nick_global_idx $nick_global_idx]
   set int_global_modes [lreplace $int_global_modes $nick_global_idx $nick_global_idx]
   set int_global_update_mode [lreplace $int_global_update_mode $nick_global_idx $nick_global_idx]
}

proc int_proc_setup { nick uhost hand chan arg } {
   global int_bind int_msg int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_mode int_bind_regexp int_questions_auto_start int_random_generator int_questions_list

   if {![channel get $chan intadd]} {
      return
   }

   set profile_name [lindex [split $arg] 0]

   if {$profile_name != ""} {
      if {![regexp $int_bind_regexp $profile_name]} {
         putnq "PRIVMSG $nick :$int_msg(bind_help)"
         return
      }

      if {[int_check_if_profile_exists $nick $uhost $profile_name $chan] == 0} {
         if {([int_nick_to_mode $nick] != "update") && ([int_nick_to_mode $nick] != "remove")} {
            if {[int_check_global_n_u $nick $uhost] == 0} {
               if {[int_check_global_pn $profile_name] == 0} {
                  lappend int_global_nicks $nick
                  lappend int_global_uhosts $uhost
                  lappend int_global_pnames $profile_name
                  lappend int_global_questions_idx 0
                  lappend int_global_answers_mode 0
                  lappend int_global_modes "setup"
                  lappend int_global_update_mode 0

#                  if {$int_random_generator == 0} {
#                     set open_dev [open "/dev/urandom" r]
#                     set get_bytes [read $open_dev 16]   
#                     close $open_dev                     
#                  } {
#                     set some_numbers [expr floor(rand() * [clock seconds])]
#                     set some_string [lindex $int_questions_list [rand [llength $int_questions_list]]]
#                     set some_char [string index $some_string [expr [rand [string length $some_string]] - 1]]
#                     set get_bytes "$some_numbers $some_char"
#                  }

#                  set md5_key [md5 $get_bytes]
                  set action_time [clock seconds]

                  set md5_key [rand 999999]
                  
                  int_new_profile_event $nick $uhost $chan $profile_name $md5_key $action_time
   
                  set key_msg $int_msg(int_key)
                  regsub -all "&k" $key_msg $md5_key key_msg

                  putnq "PRIVMSG $nick :$int_msg(int_start)"
                  putnq "PRIVMSG $nick :$key_msg"

                  if {$int_questions_auto_start == 1} {
                     int_proc_msgm $nick $uhost $hand $int_bind(questions_start)
                  }
               } {
                  putnq "PRIVMSG $nick :$int_msg(setup_profile_name_already_in_use)"
               }
            } {
               putnq "PRIVMSG $nick :$int_msg(setup_already_in_use)"
            }
         } {
            putnq "PRIVMSG $nick :$int_msg(just_one_command)"
         }
      } {
         putnq "PRIVMSG $nick :$int_msg(profile_exists)"
      }
   } {
      putnq "PRIVMSG $nick :$int_msg(setup_help)"
   }
}

proc int_proc_update { nick uhost hand chan arg } {
   global int_msg int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_mode int_bind_regexp

   if {![channel get $chan intadd]} {
      return
   }

   set profile_name [lindex [split $arg] 0]

   if {$profile_name != ""} {
      if {![regexp $int_bind_regexp $profile_name]} {
         putnq "PRIVMSG $nick :$int_msg(bind_help)"
         return
      }

      if {[int_check_if_profile_exists $nick $uhost $profile_name $chan] == 1} {
         if {([int_nick_to_mode $nick] != "setup") && ([int_nick_to_mode $nick] != "remove")} {
            if {[int_check_global_n_u $nick $uhost] == 0} {
               if {[int_check_global_pn $profile_name] == 0} {
                  lappend int_global_nicks $nick
                  lappend int_global_uhosts $uhost
                  lappend int_global_pnames $profile_name
                  lappend int_global_questions_idx 0
                  lappend int_global_answers_mode 0
                  lappend int_global_modes "update"
                  lappend int_global_update_mode 0

                  putnq "PRIVMSG $nick :$int_msg(update_start)"
               } {
                  putnq "PRIVMSG $nick :$int_msg(update_profile_name_already_in_use)"
               }
            } {
               putnq "PRIVMSG $nick :$int_msg(update_already_in_use)"
            }
         } {
            putnq "PRIVMSG $nick :$int_msg(just_one_command)"
         }
      } {
         putnq "PRIVMSG $nick :$int_msg(profile_not_exists)"
      }
   } {
      putnq "PRIVMSG $nick :$int_msg(update_help)"
   }
}

proc int_proc_remove { nick uhost hand chan arg } {
   global int_msg int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_mode int_bind_regexp

   if {![channel get $chan intadd]} {
      return
   }

   set profile_name [lindex [split $arg] 0]

   if {$profile_name != ""} {
      if {![regexp $int_bind_regexp $profile_name]} {
         putnq "PRIVMSG $nick :$int_msg(bind_help)"
         return
      }

      if {[int_check_if_profile_exists $nick $uhost $profile_name $chan] == 1} {
         if {([int_nick_to_mode $nick] != "setup") && ([int_nick_to_mode $nick] != "update")} {
            if {[int_check_global_n_u $nick $uhost] == 0} {
               if {[int_check_global_pn $profile_name] == 0} {
                  lappend int_global_nicks $nick
                  lappend int_global_uhosts $uhost
                  lappend int_global_pnames $profile_name
                  lappend int_global_questions_idx 0
                  lappend int_global_answers_mode 0
                  lappend int_global_modes "remove"
                  lappend int_global_update_mode 0

                  putnq "PRIVMSG $nick :$int_msg(remove_start)"
               } {
                  putnq "PRIVMSG $nick :$int_msg(remove_profile_name_already_in_use)"
               }
            } {
               putnq "PRIVMSG $nick :$int_msg(remove_already_in_use)"
            }
         } {
            putnq "PRIVMSG $nick :$int_msg(just_one_command)"
         }
      } {
         putnq "PRIVMSG $nick :$int_msg(profile_not_exists)"
      }
   } {
      putnq "PRIVMSG $nick :$int_msg(remove_help)"
   }
}

proc int_proc_release { nick uhost hand chan arg } {
   global int_global_nicks int_msg

   if {![channel get $chan intadd]} {
      return
   }

   if {[lsearch $int_global_nicks $nick] > -1} {
      int_nick_for_delete $nick
      putnq "PRIVMSG $nick :$int_msg(release_done)"
   } {
      putnq "PRIVMSG $nick :$int_msg(release_empty)"
   }
}

proc int_proc_msgm { nick uhost hand arg } {
   global int_bind int_msg int_questions_list int_global_questions_idx int_questions_key int_questions_regexp int_question_help

   set arg [string trim $arg]

   if {[int_check_global_n_u $nick $uhost] == 1} {
      set profile_name [int_nick_to_profile $nick]
      set nick_global_idx [int_nick_to_idx $nick]
      set nick_answer_mode [int_nick_to_answer_mode $nick]
      set nick_update_mode [int_nick_to_update_mode $nick]
      set questions_counter [expr [llength $int_questions_list] - 1]
      set action_time [clock seconds]
      set nick_question_idx [lindex $int_global_questions_idx $nick_global_idx]
      set nick_int_mode [int_nick_to_mode $nick]

      if {$nick_int_mode == "setup"} {
         if {$nick_answer_mode == 0} {
            if {$int_bind(questions_start) == $arg} {
               putnq "PRIVMSG $nick :[lindex $int_questions_list $nick_question_idx]"
               int_switch_answer_mode $nick
            }
         } {
            if {[lindex $int_global_questions_idx $nick_global_idx] < $questions_counter} {
               if {[regexp [lindex $int_questions_regexp $nick_question_idx] $arg]} {
                  int_incr_nick_idx $nick

                  int_answer_event $nick $uhost $profile_name $arg $action_time [lindex $int_questions_key $nick_question_idx]
                  putnq "PRIVMSG $nick :[lindex $int_questions_list [expr $nick_question_idx + 1]]"
               } {
                  putnq "PRIVMSG $nick :[lindex $int_question_help $nick_question_idx]"
               }
            } {
               if {[regexp [lindex $int_questions_regexp $nick_question_idx] $arg]} {
                  int_answer_event $nick $uhost $profile_name $arg $action_time [lindex $int_questions_key $nick_question_idx]
                  int_nick_for_delete $nick
                  putnq "PRIVMSG $nick :$int_msg(int_end)"
               } {
                  putnq "PRIVMSG $nick :[lindex $int_question_help $nick_question_idx]"
               }
            }
         }
      } elseif {$nick_int_mode == "update"} {
         set question_list [list]

         set question_idx 1
         foreach question $int_questions_list {
            if {$question != ""} {
               lappend question_list "$question_idx\) $question"
               incr question_idx 1
            }
         }

         set question_list [join $question_list ", "]

         if {$nick_answer_mode == 0} {
            if {[int_check_if_key_is_correct $nick $uhost $profile_name $arg] == 1} {
               putnq "PRIVMSG $nick :$int_msg(update_welcome)"
               putnq "PRIVMSG $nick :$int_msg(update_question_list) $question_list"
               int_switch_answer_mode $nick
            } {
               int_nick_for_delete $nick
               putnq "PRIVMSG $nick :$int_msg(update_wrong_key)"
            }
         } {
            if {$nick_update_mode == 0} {
               if {[regexp {^[0-9]+$} $arg]} {
                  if {($arg > 0) && ($arg <= [expr $questions_counter + 1])} {
                     putnq "PRIVMSG $nick :[lindex $int_questions_list [expr $arg - 1]]"
                     int_switch_update_mode $nick
                     int_set_nick_idx $nick [expr $arg - 1]
                  } {
                     putnq "PRIVMSG $nick :$int_msg(update_question_number_range)"
                  }
               } {
                  putnq "PRIVMSG $nick :$int_msg(update_question_number)"
               }
            } {
               if {[regexp [lindex $int_questions_regexp $nick_question_idx] $arg]} {
                  int_update_event $nick $uhost $profile_name $arg $action_time [lindex $int_questions_key $nick_question_idx]
                  putnq "PRIVMSG $nick :$int_msg(update_done)"
                  putnq "PRIVMSG $nick :$int_msg(update_question_list) $question_list"
                  int_switch_update_mode $nick
                  int_set_nick_idx $nick 0
               } {
                  putnq "PRIVMSG $nick :[lindex $int_question_help $nick_question_idx]"
               }
            }
         }
      } elseif {$nick_int_mode == "remove"} {
         if {[int_check_if_key_is_correct $nick $uhost $profile_name $arg] == 1} {
            int_nick_for_delete $nick
            int_remove_profile_event $nick $uhost $profile_name $action_time
            putnq "PRIVMSG $nick :$int_msg(remove_end)"
         } {
            int_nick_for_delete $nick
            putnq "PRIVMSG $nick :$int_msg(remove_wrong_key)"
         }
      }
   }
}

proc int_proc_sessions { nick uhost hand chan arg } {
   global int_msg int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_questions_key int_global_modes int_global_update_mode

   if {![channel get $chan intadd]} {
      return
   }

   set sess_len [llength $int_global_nicks]

   if {$sess_len > 0} {
      putnq "PRIVMSG $nick :nick   |   uhost   |   profile   |   qidx   |   qkey   |   amode   |   imode   |   umode"

      for {set i 0} {$i < $sess_len} {incr i 1} {
         putnq "PRIVMSG $nick :[lindex $int_global_nicks $i]   |   [lindex $int_global_uhosts $i]   |   [lindex $int_global_pnames $i]   |   [lindex $int_global_questions_idx $i]   |   [lindex $int_questions_key [lindex $int_global_questions_idx $i]]   |   [lindex $int_global_answers_mode $i]   |   [lindex $int_global_modes $i]   |   [lindex $int_global_update_mode $i]"
      }
   } {
      putnq "PRIVMSG $nick :$int_msg(sessions_list_empty)"
   }
}

proc int_proc_flush { nick uhost hand chan arg } {
   global int_global_nicks int_msg int_bind_regexp int_global_nicks int_global_uhosts int_global_pnames int_global_questions_idx int_global_answers_mode int_global_modes int_global_update_mode

   if {![channel get $chan intadd]} {
      return
   }

   set nick_to_flush [lindex [split $arg] 0]

   if {$nick_to_flush != ""} {
      if {![regexp $int_bind_regexp $nick_to_flush]} {
         putnq "PRIVMSG $nick :$int_msg(bind_help)"
         return
      }

      if {[lsearch $int_global_nicks $nick_to_flush] > -1} {
         int_nick_for_delete $nick_to_flush
         putnq "PRIVMSG $nick :$int_msg(session_destroyed)"
      } {
         putnq "PRIVMSG $nick :$int_msg(session_n_exists)"
      }
   } {
      set int_global_nicks [list]
      set int_global_uhosts [list]
      set int_global_pnames [list]
      set int_global_questions_idx [list]
      set int_global_answers_mode [list]
      set int_global_modes [list]
      set int_global_update_mode [list]
      putnq "PRIVMSG $nick :$int_msg(all_sessions_destroyed)"
   }
}

proc int_proc_part { nick uhost hand chan msg } {
   global int_global_nicks

   if {![channel get $chan intadd]} {
      return
   }

   if {[lsearch $int_global_nicks $nick] > -1} {
      int_nick_for_delete $nick
   }
}

proc int_proc_sign { nick uhost hand chan msg } {
   global int_global_nicks

   if {![channel get $chan intadd]} {
      return
   }

   if {[lsearch $int_global_nicks $nick] > -1} {
      int_nick_for_delete $nick
   }
}

proc int_proc_splt { nick uhost hand chan } {
   global int_global_nicks

   if {![channel get $chan intadd]} {
      return
   }

   if {[lsearch $int_global_nicks $nick] > -1} {
      int_nick_for_delete $nick
   }
}

proc int_proc_kick { nick uhost hand chan target rsn } {
   global int_global_nicks

   if {![channel get $chan intadd]} {
      return
   }

   if {[lsearch $int_global_nicks $target] > -1} {
      int_nick_for_delete $target
   }
}

proc int_proc_nick { nick uhost hand chan newnick } {
   global int_global_nicks

   if {![channel get $chan intadd]} {
      return
        }

   set nick_global_idx [int_nick_to_idx $nick]
   if {$nick_global_idx > -1} {
      set int_global_nicks [lreplace $int_global_nicks $nick_global_idx $nick_global_idx $newnick]
   }
}

putlog "interviewer-addon.tcl ver 0.1 by tomekk loaded"
# end of magic ;)


try it...
Back to top
View user's profile Send private message Visit poster's website
sk-4
Halfop


Joined: 06 Oct 2007
Posts: 51

PostPosted: Mon Nov 02, 2009 6:28 am    Post subject: Reply with quote

thanks bro ..the keygen is working properly as i want it..

the sample
HeRe iS YouR KeYGeN: 52195
Back to top
View user's profile Send private message
sk-4
Halfop


Joined: 06 Oct 2007
Posts: 51

PostPosted: Tue Nov 03, 2009 6:04 am    Post subject: Reply with quote

bro Tomek.. How to check if the bot msg the channel when their is birthday..

i set sk's birthday: 03-11-1979 ..but there is no respond. any idea how to check the date or maybe any public to command to check which birthday is coming 1st..
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Wed Nov 04, 2009 7:02 am    Post subject: Reply with quote

show me your:
Code:
# bind for birthday date checks
# 0 - disable
# 1 - enable, bot sohuld checks dates every day
set profile_birth_checks 1

# if profile_birth_checks is set to 1,
# you can set here on which hour/minute bot will check the birth dates (hour in 24clock format, hours/minutes in format like: 02, 03, 04, 11, 22 etc)
set profile_birth_hour 10
set profile_birth_minute 05

# birthday entry position in profile datafile
# default 3rd position, after 'from' and 'sex' fields
set profile_birth_file_pos 3


and:
Code:
# all these five lists must have the same number of elements
# headers for !view
set profile_view_headers {
   "&n location:"
   "&n sex:"
   "&n birthday:"
   "&n description:"
   "&n likes:"
   "&n limits:"
}

# questions lists, one by one
set int_questions_list {
   "your location ;>"
   "your sex ;>"
   "your birthday date ;>"
   "your description ;>"
   "your likes ;>"
   "your limits ;>"
}

# uniq key of each question
# some short uniq word, without spaces will be better
set int_questions_key {
   "location"
   "sex"
   "birth"
   "desc"
   "likes"
   "limits"
}

# questions regexps, one by one
# if you don't know how to build regexp, use {.*}  and pray (.* any chars ;p)
set int_questions_regexp {
   {.*}
   {^(male|female)$}
   {^[0-9]{2}\-[0-9]{2}\-[0-9]{4}$}
   {.*}
   {.*}
   {.*}
}
Back to top
View user's profile Send private message Visit poster's website
sk-4
Halfop


Joined: 06 Oct 2007
Posts: 51

PostPosted: Wed Nov 04, 2009 9:37 am    Post subject: Reply with quote

# bind for birthday date checks
# 0 - disable
# 1 - enable, bot sohuld checks dates every day
set profile_birth_checks 1

# if profile_birth_checks is set to 1,
# you can set here on which hour/minute bot will check the birth dates (hour in 24clock format, hours/minutes in format like: 02, 03, 04, 11, 22 etc)
set profile_birth_hour 23
set profile_birth_minute 45

# birthday entry position in profile datafile
# default 3rd position, after 'from' and 'sex' fields
set profile_birth_file_pos 3



# all these five lists must have the same number of elements
# headers for !view
set profile_view_headers {
"&n location:"
"&n sex:6"
"&n birthday:"
"&n description:"
"&n favourite:"
"&n quote:"
}

# questions lists, one by one
set int_questions_list {
"Thanks for taking the time to set up a profile so we may better know you. For the first step you setup ur 4location .. ex: California "
"Are you ready for the next step which is SEX..Type in your sex (male/female/gay/lesbian/bot/alien)..Check ur spelling 10ex: bot"
"For the next step which is Birthday.. ex: 12-30-1980, 02-03-1975"
"Next step which is describe about me.. ex: The Chatter Bot"
"Great next Question is likes .. ex: I love Chatting,Flirting,Dating"
"Fantastic, now you are ready for the last step which is favourite quote ex: No one is guaranteed happiness. Life just gives each person time and space. It's up to us to fill it with joy "
}

# uniq key of each question
# some short uniq word, without spaces will be better
set int_questions_key {
"location"
"sex"
"birth"
"desc"
"likes"
"quote"
}

# questions regexps, one by one
# if you don't know how to build regexp, use {.*} and pray (.* any chars ;p)
set int_questions_regexp {
{.*}
{^(male|Male|Female|female|gay|lesbian|bot|alien)$}
{^[0-9]{2}\-[0-9]{2}\-[0-9]{4}$}
{.*}
{.*}
{.*}
}



i only changed the name "&n limits:" to "&n quote:".. anything mistake there ?
Back to top
View user's profile Send private message
tomekk
Master


Joined: 28 Nov 2008
Posts: 255
Location: Oswiecim / Poland

PostPosted: Wed Nov 04, 2009 10:21 am    Post subject: Reply with quote

sk-4 wrote:
bro Tomek.. How to check if the bot msg the channel when their is birthday..

i set sk's birthday: 03-11-1979 ..but there is no respond. any idea how to check the date or maybe any public to command to check which birthday is coming 1st..


ahh.. i didn't see this..

date format is in "MONTH-DAY-YEAR" MM-DD-YYYY
then, you should write "11-03-1979"

Quote:
23:40:21 -!- botty [tomekk@10.0.1.10] has joined #thechan
23:45:03 < botty> tomekk birthday is today and he/she is 69


and should be 'tomekk's'... my mistake...
profile.tcl -> profile_check_birthday proc
change:
Code:
putquick "PRIVMSG $output_channel :$profile birthday is today and he/she is [expr $current_clock_year - $birth_year]"

to:
Code:
putquick "PRIVMSG $output_channel :$profile\'s birthday is today and he/she is [expr $current_clock_year - $birth_year]"
Back to top
View user's profile Send private message Visit poster's website
sk-4
Halfop


Joined: 06 Oct 2007
Posts: 51

PostPosted: Fri Nov 06, 2009 5:55 am    Post subject: Reply with quote

Thanks Sir Tomekk, For Ur help.. so far ur script working gr8.. even the birthhay msg in the channel aslo showing properly.. Good luck
Back to top
View user's profile Send private message
Football
Master


Joined: 26 Dec 2008
Posts: 205
Location: Quakenet, #Football

PostPosted: Thu Nov 19, 2009 9:10 am    Post subject: Reply with quote

an addition:

is it possible that when a user who has a profile setup, the bot will greet him when he joins by his name, like <Bot> Hi Tommy
but will also greet him by the bot's local time clock
like between 0-6: Good night Tommy. 6-12: good morning Tommy
12-17: good afternon Tommy and 17-24: good evening Tommy?

aswell as adding an option for defining his name?

* Can you paste the full scripts as they are fixed?
_________________
Idling at #Football, Quakenet.
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 Requests All times are GMT - 4 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
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