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 

please help

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
abah
Halfop


Joined: 01 Dec 2013
Posts: 61
Location: Indonesia

PostPosted: Tue Feb 17, 2015 6:29 am    Post subject: please help Reply with quote

I would like to ask a little help for the script because I do not know how to make it stop when! start can not be made script stopkan please !stop thanks

Code:
bind pub * !story join:story
proc join:story {nick uhost hand chan rest} {
  global story_timers
  set story "cerita/ukhuwah.txt"
  if {![info exists story_timers($story)]} {
    slowmsg $story
  } else {
    puthelp "privmsg $nick :already reading..."
  }
}
proc slowmsg {file {pos 0}} {
  global story_timers
  set f [open $file]
  seek $f $pos
  if {[gets $f line]>-1} {
    putserv "privmsg #Ukhuwah :$line"
    set story_timers($file) [utimer 11 [list slowmsg $file [tell $f]]]
  } else {
    utimer 15 [list putserv "Re-reading the story:"]
    set story_timers($file) [utimer 16 [list slowmsg $file]]
  }
  close $f
}
Back to top
View user's profile Send private message
Get_A_Fix
Master


Joined: 07 May 2005
Posts: 206
Location: New Zealand

PostPosted: Wed Feb 18, 2015 2:16 pm    Post subject: Reply with quote

In this case it would be pretty easy, you'd just have to add a killtimer to a !stop command.

Code:

bind pub o|o !stop stop:story
proc stop:story {nick uhost hand chan arg} {
  global story_timers
  if {[info exists story_timers]} {
    killtimer story_timers*
  }
}


Or something to that effect.

This binds using o|o (globalop|chanop) - reducing the use to everyone, thus minimising on unwanted flood attempts.
_________________
We explore.. and you call us criminals. We seek after knowledge.. and you call us criminals. We exist without skin color, without nationality, without religious bias.. and you call us criminals.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
abah
Halfop


Joined: 01 Dec 2013
Posts: 61
Location: Indonesia

PostPosted: Thu Feb 19, 2015 1:42 am    Post subject: Reply with quote

thank for response i try

Edit: thanks for the help and the response will be, but I've tried and it did not work if there is another search?
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 -> Scripting Help 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