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.

Modify tcl by bind willyw

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
i
irclove
Voice
Posts: 5
Joined: Thu Dec 09, 2010 3:11 pm

Modify tcl by bind willyw

Post by irclove »

please someone to modify these changes
Sorry for my bad English, greetings from peru

I want to do it for private notice and not by the channel

Code: Select all

 putserv "privmsg $mainchan :$nick will help in seconds"
in private msg to <imnick>
<eggdrop> admin1 will help in secods
---------------------------------------------------------------------------------
and also inform once

Code: Select all

       putserv "privmsg $nick :To enable a short window of time for you to send help requests via /msg to the bot, you must first send !helpme       in $mainchan " 
      }    
}       
      
thus:
in private msg bot:
<imnick> hello I can help
<eggdrop> I am a bot if you need help write: !helpme
<imnick> dasda
<imnick> ghjgh
<imnick> asdas
----------------------------------------------------------------------------------
and also that the !helpme either by private

Code: Select all

bind pub - "!helpme" do:helpme
thus:
in private msg bot:
<imnick> asfasd
<eggdrop> I am a bot if you need help write: !helpme
<imnick> !helpme
<eggdrop> Please describe your problem, in a single line
<imnick> my problem asdasd
-----------------------------------------------------------------------------------
in the channel: $helpchan
if someone already wrote !helper Nick, reply bot:
<eggdrop> <imnick> has the following problem: my problem asdasd
<eggdrop> If you want to help <imnick> write !Helper <imnick>
<admin1> !helper <imnick>
<eggdrop> notifying <imnick>
<admin2> !helper <imnick>
<eggdrop> admin1 is helping <imnick>


Full code by: willyw
in chan #123
andrec has joined #123
<andrec> !helpme
// in private msg //
<bothelper> Please describe your problem, in a single line:
<andrec> my pc has virus.

in chan #help
<bothelper> <andrec> has the following problem: my pc has virus.
<bothelper> If you want to help <andrec> write !Helper <andrec>
<@othernick> !helper andrec
<bothelper> notifying <andrec>...

in chan #123 Private msg <andrec>.
<bothelper> <@othernick> will help in seconds.

Code: Select all

### begin configuration #### 

# set main channel here 
set mainchan "#123" 

# set help channel here 
set helpchan "#help" 

# set time window here ( in seconds ) 
# this is the amount of time that a user has, after sending !helpme, to then reply to the /msg sent to user by the bot 
set timewindow "45" 

# set repy window time here ( in seconds ) 
# this is the amount of time that a helper has in which to send !helper <nick> 
set replywindow "120" 


#### end configuration ### 

###  script starts here 

bind pub - "!helpme" do:helpme 
bind msgm - * do:prob 
bind pub - "!helper" do:helpchanreply 

set nick2help "0" 
set replytime "0" 


proc do:helpme {nick uhost handle chan text} { 
global nick2help timewindow mainchan replywindow replytime helpchan 

  if {![botonchan $helpchan]} { 
   putserv "privmsg $chan : Sorry, help function is temporarily Off" 
   return 0 
     } 


  if {"$chan"=="$mainchan"} { 
   putserv "privmsg $nick :Please describe your problem, in a single line:" 
   set nick2help $nick 
   set replytime $replywindow 
   utimer $timewindow [list set nick2help 0] 
   utimer $replywindow [list set replytime 0] 
  } 
} 


proc do:prob {nick uhost handle text} { 
global nick2help helpchan mainchan 

   if {![botonchan $helpchan]} { 
      putserv "privmsg $nick :Sorry, help function is temporarily Off" 
      return 0 
         } 

   if {"$nick"=="$nick2help"} { 
      putserv "privmsg $helpchan :$nick has the following problem: $text " 
      putserv "privmsg $helpchan : If you want to help $nick write !Helper $nick" 

      putserv "privmsg $nick :Your text describing your problem has been sent" 
      putserv "privmsg $nick :Please stand by a few minutes. If help is available now, you will be notified shortly." 

      return 0 
         } else { 
      putserv "privmsg $nick :To enable a short window of time for you to send help requests via /msg to the bot, you must first send   !helpme       in $mainchan " 
      }    
}       


proc do:helpchanreply {nick uhost handle chan text} { 
global helpchan mainchan nick2help replytime 

   if {![botonchan $mainchan]} { 
      putserv "privmsg $chan :Sorry, bot is not in $mainchan" 
      return 
       } 

   if {"$replytime"=="0"} { 
      putserv "privmsg $chan :Sorry, no one has recently asked for help" 
      return 
      } 

   if {"$chan"=="$helpchan"} { 
       putserv "privmsg $chan :notifying $text" 
      putserv "privmsg $mainchan :$nick will help in seconds" 
     } 
}
Last edited by irclove on Sun Dec 26, 2010 10:05 pm, edited 1 time in total.
w
willyw
Revered One
Posts: 1203
Joined: Thu Jan 15, 2009 12:55 am

Post by willyw »

I have replied to your PM here, that I think was regarding this.

Part of it, I offered something for you to try.

Unfortunately, most of it - I was unsure of exactly what it is that you are requesting.

Maybe it would be better if we kept it here in the forum, and not in PM. Perhaps some others could help too, not just with the TCL itself, but with getting the point across clearly.
Whatever anyone can offer, will be good.
Post Reply