Browse Source

[fixed] A BIG whoopsy on my part...

anjuna krokus 2 weeks ago
parent
commit
99518df736
1 changed files with 6 additions and 4 deletions
  1. 6 4
      locations/telefon.qsrc

+ 6 - 4
locations/telefon.qsrc

@@ -136,12 +136,13 @@ if $ARGS[0] = 'SetCallSchedule':
 	if telefonCon['ContactListID'] = -1:
 		!! If the contact does not exist, create an anonymous contact.
 		gs 'telefon', 'AddContact', $telefonCon['NPC'], 'icon_na', 1
+		telefonCon['ContactListID'] = arrsize('$contact') - 1
 	end
 
 	$telefonCon['OutCode'] = $ARGS[2]
-	if $ARGS[3] ! '': $telefonCon['OutSched'] = $ARGS[3] else $telefonCon['OutSched'] = "0"
+	$telefonCon['OutSched'] = iif($ARGS[3] ! '', $ARGS[3], "0")
 	$telefonCon['InCode'] = $ARGS[4]
-	if $ARGS[5] ! '': $telefonCon['InSched'] = $ARGS[5] else $telefonCon['InSched'] = "0"
+	$telefonCon['InSched'] = iif($ARGS[5] ! '', $ARGS[5], "0")
 
 	$contactOCode[telefonCon['ContactListID']] = $telefonCon['OutCode']
 	$contactOSche[telefonCon['ContactListID']] = $telefonCon['OutSched']
@@ -176,12 +177,13 @@ if $ARGS[0] = 'SetSMSSchedule':
 	if telefonCon['ContactListID'] = -1:
 		!! If the contact does not exist, create an anonymous contact.
 		gs 'telefon', 'AddContact', $telefonCon['NPC'], 'icon_na', 1
+		telefonCon['ContactListID'] = arrsize('$contact') - 1
 	end
 
 	$telefonCon['OutSMSCode'] = $ARGS[2]
-	if $ARGS[3] ! "": $telefonCon['OutSMSSched'] = $ARGS[3] else $telefonCon['OutSMSSched'] = "0"
+	$telefonCon['OutSMSSched'] = iif($ARGS[3] ! '', $ARGS[3], "0")
 	$telefonCon['InSMSCode'] = $ARGS[4]
-	if $ARGS[5] ! "": $telefonCon['InSMSSched'] = $ARGS[5] else $telefonCon['InSMSSched'] = "0"
+	$telefonCon['InSMSSched'] = iif($ARGS[5] ! '', $ARGS[5], "0")
 
 	$contactOSMSCode[telefonCon['ContactListID']] = $telefonCon['OutSMSCode']
 	$contactOSMSSche[telefonCon['ContactListID']] = $telefonCon['OutSMSSched']