Please Disable Ad-Block To View This Website.

If you block ads, this site can not survive!

Ads are very minimal for registered users. If you don't have an account please register now!

DOWNLOAD
 Full Scripts
 Addons
 Snippets
 DLLs
 MTS Themes
 Tutorials
 Misc.
 File Queue
 Download mIRC
INTERACT
 Screenshots
 Challenge
 Top Downloads
 Submit Form
 Forums

SEARCH
Site Search

FRIENDS
Link to us!
PhotoShelf

Home | Forum:
mircscripts.org Forums > Scripting Help     Search Forums...

  Thread mode:   Index | < Prev. | Next >

esgijshc
  new!   RE: kick nicks from a txt fileCopy to Clipboard

User: #26972
Joined: Apr 24th 2004
Posts: 208
quote:
Shadow said:

i'll write for you, wait a time..
thats already done?:
quote:
Kamek said:

You may have some speed gain with that, but it won't be that great (I'm quite surprised to see it got twice as fast). What makes $read() slow is that it opens and closes the file once for every call – thus, using $read() only once is perfectly ok. Your code is no different: open the file, perform a seek, read a line, close it.

This one will keep the file open for 5 seconds after it is read, reusing the handle if other people join the channel. (note: not tested, not benchmarked, but I'm pretty sure it will be faster)

ON ^@*:JOIN:#channel: {
  if ($fopen(kicklist)) { .fseek kicklist 0 }
  else { .fopen kicklist "path to your text file" }
  .fseek -w kicklist $nick
  if ($fopen(kicklist).err) { .fclose kicklist }
  else {
    if (!$fopen(kicklist).eof) { kick # $nick }
    .timerkicklist-close -io 1 5 .fclose kicklist
  }
}




Jun/3/2004 3:37PM


Replies


 kick nicks from a txt file - jimeno (Jun 3, 2004 @ 4:09AM)   new!   

 RE: kick nicks from a txt file - Mpdreamz (Jun 3, 2004 @ 4:26AM)   new!   

 RE: kick nicks from a txt file - cold (Jun 3, 2004 @ 5:25AM)   new!   

 RE: kick nicks from a txt file - Mpdreamz (Jun 3, 2004 @ 9:40AM)   new!   

 RE: kick nicks from a txt file - Kamek (Jun 3, 2004 @ 3:15PM)   new!   

 RE: kick nicks from a txt file - cold (Jun 3, 2004 @ 5:02PM)   new!   

 RE: kick nicks from a txt file - Andy (Jun 16, 2004 @ 4:19PM)   new!   

 RE: kick nicks from a txt file - Shadow (Jun 3, 2004 @ 11:22AM)   new!   

 RE: kick nicks from a txt file - esgijshc (Jun 3, 2004 @ 3:37PM)   new!   

 RE: kick nicks from a txt file - jimeno (Jun 3, 2004 @ 7:33PM)   new!   



Post Reply

You must be logged in to post messages.